Questions tagged [docker]

If you need assistance with constructing and operating Docker containers, feel free to ask. However, please note that DOCKER INQUIRIES SHOULD PERTAIN DIRECTLY TO SOFTWARE DEVELOPMENT. Relevant subjects may involve Dockerfiles, Docker Compose, and architectural considerations. As a general guideline, if your question concerns activities occurring within the container, it is likely appropriate for this forum; whereas queries pertaining to external elements are probably better suited elsewhere.

What causes a Docker container to exit with code 0?

I am currently in the process of developing a Messenger Bot using the Botkit framework! As I switch between different computers, I have decided to utilize docker to avoid any local configuration issues. However, I am fairly new to both botkit and docker. ...

Once the PostgreSQL container is stopped with docker-compose down, the previously used port becomes unavailable for use again

Currently, I am involved in a project which utilizes express as the server and postgres as the database to delve into dockerization. The server relies on the database being operational. Initially, when running docker-compose up everything functions correct ...

What could be causing Laravel Sail NPM to display the error message 'unsupported version of Node.js'?

In the midst of a Laravel 8 project using Docker, I find myself knee-deep in SCSS design. However, a hurdle arises when attempting to compile my SCSS files. NPM insists that my Node version is outdated at 12.x, even though within my container I am actually ...

Analyzing a halted docker container with Python by utilizing the inspect_container function

Currently working on test coding using Python. I am trying to create a method that will display the status of a container (either running or stopped). import docker class Container: def __init__(self, name, image, *, command=[], links={}): s ...

Issues arise within the Docker container due to an error stating "unable to initiate a new session thread"

My web crawling solution is built using Python and Selenium, running in a Docker container on an m4.2xlarge EC2 instance with multiprocessing implemented using the Pool method. with Pool(processes=(config.no_of_cpus)) as pool: pool.map(func, items) pool. ...

Error message: The 'Access-Control-Allow-Origin' policy is preventing access in a react express docker application

I have successfully set up a front-end React application and a Node/Express API using Docker. The React app is currently running on localhost:3000, while the API is running on localhost:9000. Both applications are fully functional. However, I am encounteri ...

Comparing Amazon Fargate and EC2 for hosting container-based websites

In a recent project, I was tasked with building a React / NextJS application that will experience occasional high traffic but mostly remain idle. Our goal is to find the most cost-effective options while still creating a scalable and manageable app with a ...

Utilizing NextJS App in a Docker Container with Production Environment Variables

Everything runs smoothly when testing and using my NextJS Application with .env.local. However, the issue arises during a production build for deployment as it fails to locate the .env.production values, even though they are an exact replica of .env.local ...

The issue of Selenium crashing in Docker because the browsing context has been discarded

Looking for a solution on how to execute Selenium based tests within Docker? I'm experimenting with running Python+Selenium tests that utilize Firefox and Geckodriver in an Ubuntu 18 Docker container. The contents of my docker-compose.yml file are as fol ...

Production builds of NextJS do not have access to environment variables

I am facing an issue with my NextJS application that connects to a database through the API. During development, I store my environment variables in a .env file which contains the host, port, username, password, and database details. When I run npm run dev ...

I'm having trouble getting nginx to serve my react index.html as a fallback. Can anyone help troub

I am encountering an issue with my setup involving two docker images on the same machine. One image is running nginx serving a react app, while the other is a back-end express server. The problem arises when my front-end app uses react router to create rou ...

The nvm is functioning properly within the bash shell, however, it is not working within the

RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash - && \ . $HOME/.nvm/nvm.sh && \ nvm ls && \ chmod -R 777 /bin/ && \ nvm install ...

Could not locate the <command> within the docker container causing npm script to fail with sh: 1 error

Query Whenever I execute the command npm run start:debug within a docker container, I encounter this particular error: # npm run start:debug > <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6001100920504e504e50">[email ...

npm ci is encountering a problem with conflicting peer dependencies

I'm currently in the process of installing dependencies from a Dockerfile using the command RUN npm ci. However, I keep encountering an error that says Conflicting peer dependencies. Fix the upstream dependency conflict, or retry this command with --force, ...

Troubleshooting: Issue with Docker PHP 5.6.23 setup - mysqli_connect function not working even after extension addition

Despite serving files in the docker environment, I am facing an issue with establishing a database connection using mysqli_connect($host, $username, $password, $dbName). It keeps throwing an error stating that mysqli_connect is not recognized as a function ...

What are the steps to troubleshoot a running Express.js application in a Docker container that is not accessible?

I created an application utilizing Express.js with Prisma as its ORM. My goal is to deploy the application using Docker, and once it's exposed in the container, I aim to access it locally through docker run -p 3001:3002 klinikpintar/ttv:1.0. In the ...

The functionality of `npm run` does not meet the expected behavior within a Docker container

Currently, I am in the process of developing a React app using Vite and deploying it via Docker containers. However, when attempting to deploy the container, executing npm run build seems to have no effect; even manually running it inside the container doe ...

Leveraging an SSH key to securely install an npm module from a private repository within a Docker

My role involves creating containers for nodejs projects. Within these projects, I utilize a private repository and require access to it. To achieve this, I have implemented the following Dockerfile: FROM node:15 RUN echo "StrictHostKeyChecking no&qu ...

Creating a Docker image for a nodejs application starting from a blank slate

I am relatively new to using Docker and I am looking to create a node-js image completely from scratch. I have done some research online, but most images seem to be based on other node-js images. So far, I have attempted to include the node executables a ...

Issue with nestjs build due to ts-loader module in dev-dependency

I've encountered a Module Error with ts-loader during a docker build ERROR [6/6] RUN nest build 3.9s ------ > [6/6] RUN ...

What could be the reason for my node container not recognizing the environment variable I specified in docker-compose.yml?

Within my docker-compose.yml file, I have defined the environment variable NODE_ENV like this: node2: image: ... environment: - "NODE_ENV=production" In my Dockerfile, it looks something like this: FROM node:latest ... //all the usual stuff ...

Adding a secure npm repository to a docker container using kubernetes/skaffold deployment strategy

I'm currently facing challenges with building my application on a local cluster using skaffold, k8s, and docker. In particular, I have a code repository that requires a private NPM package, but during the build process, it seems to lose the .npmrc file or ...

Building a Next.js application in a docker container on a local machine using minikube is successful, however, the build fails when attempting to build it on a staging environment

I've encountered a puzzling issue. My next.js app is running in a docker container. It builds successfully on my local Ubuntu machine with minikube and ks8 orchestration, but it gets stuck indefinitely during the build process on the staging setup. The ha ...

The progress bars in the Docker console are not showing up as expected

I'm attempting to incorporate one of npm's terminal progress bars to visually represent the progress of a lengthy process. When I execute it using the standard "node index.js" command, everything works smoothly. However, when running it from a ba ...

When attempting to initiate a new session with Docker Alpine running JDK, Chromium, and Selenium, an error occurred. This could be due to either an incorrect address for the remote server or

When my java application worked correctly on local Ubuntu without Docker, it had the following setup: JDK 11, Spring Boot, Selenium 4.0.0-rc-1, Chromium 97.0.4692.99, ChromeDriver 96.0.4664.45 However, when I migrated the Java app to Docker (Alpine), it ...

Troubleshooting a Docker-Compose issue: UnhandledPromiseRejectionWarning with Node and PostgreSQL connection

I am currently working on connecting the postgres and node containers in my setup. Here are the details: My yml file: version: "3" services: postgresDB: image: postgres:alpine container_name: postgresDB ports: - "5432:54 ...

The Angular2 app and NodeJs in the Docker container are unresponsive

After creating a new Angular2 app using angular-cli and running it in Docker, I encountered an issue where I could not connect to it from localhost. First, I initialized the app on my local machine: ng new project && cd project && "put m ...

Issue encountered: Multipath Kubernetes Ingress error, unable to access resource at /

As I delve into the realm of multipath in Kubernetes Ingress, my journey begins with minikube for this enlightening tutorial. To kick things off, I've crafted a straightforward Web API utilizing node js. NodeJS Code Within this NodeJS masterpiece lies a s ...

Is it beneficial to dockerize an AngularJS + nginx codebase?

Currently, I am working on an AngularJS front-end project that is hosted on nginx and communicates with a back-end Java server (which is not part of this codebase). Each time I need to install the package, I run the following commands: # ensure that node, ...

add nodejs while creating a docker image

I'm encountering an issue while attempting to create my first docker image. Below is the content of my Dockerfile: FROM debian:9 RUN apt-get update -yq \ && apt-get install -yq curl gnupg \ && curl -sL https://deb.n ...

Creating a dynamic webpage using the MVC design pattern within a Docker container

I am facing a challenge with my dotnet core application that has authorization. Due to company policy restrictions, Bearer tokens cannot be stored on the front-end. To work around this, I want to utilize an MVC Controller. However, the application is built ...

Evaluate software on a local environment for both Google Cloud and Azure

Is there a method to locally test applications designed for Google Cloud or Azure on a computer, comparable to the Localstack Docker image used for AWS? Your help is greatly appreciated! ...

Node.js in Docker is unable to generate an image

the image: # pulling the official base image FROM node:17.5 # setting up the working directory WORKDIR /app # including `/app/node_modules/.bin` to $PATH ENV PATH /app/node_modules/.bin:$PATH # installing application dependencies COPY package.json ./ CO ...

What steps should I take to fix the error message: "Module not found: '/node dist/api/server.js/dist/server.js'"?

Review my Docker File FROM node:10.16 # Set up app directory WORKDIR /node dist/api/server.js # Adding dependencies COPY . . # Installing necessary npm packages RUN npm install -g node-pre-gyp --unsafe-perm RUN npm install -g node-gyp --unsafe-perm RU ...

Utilize the Golang Selenium library to establish a connection with a Selenium server and run headless Chrome

I recently started using the Go selenium package available at this link Currently, I have set up a headless chrome + selenium-server configuration within a docker container on localhost:4444 The server appears to be running smoothly as I am able to acces ...

Struggling with Docker build hanging on pm2 start command

I am trying to build a docker container by using the following Dockerfile: FROM node:12-buster WORKDIR /opt/myapps/ COPY . /opt/myapps/ RUN apt update RUN apt upgrade -y RUN apt install git -y RUN git config --global user.email "someone@example.com" RUN ...

What is the Firefox Gecko equivalent of the --disable-dev-shm-usage flag found in Chrome?

Welcome to the Docker environment featuring a Docker Container running on ubuntu:18.10 with geckodriver-v0.23.0-linux64 and selenium-3.14.1. While using Chrome, I encountered resource allocation issues in my Docker Container. The problem was resolved by a ...

Encountering a failure during the Docker build process due to an unsupported operating system, along with a non-zero return code from the command '/bin/sh -c npm install'

I'm having trouble building an image for a client app (nextjs app) as the build keeps failing. Here is the docker file I am using: FROM node:12.18.3 WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH COPY package.json /app/ COPY package-lock.json /app/ RU ...

ReactJS and Docker-Compose issue: "Essential file not found"

My ReactJS application has been dockerized for development using Docker for Windows. The application is built into a docker image and runs on a container with the help of docker-compose tool. The package.json file below shows an outdated ReactJS scaffoldin ...

Guide on building an npm package within a Docker container using several layers of proprietary repository dependencies

Is there a way to perform an npm install within a Docker container that needs to access multiple dependencies from GitHub repositories? Here's the scenario I'm facing: I have to npm install from a private repo (for which I have permission), but t ...

An error occurred in the devtools session due to a WebException, stating that the remote name could not be resolved for 'http'

After setting up a new session to Support DevTools Session on docker for selenium 4, I encountered an issue. Everything seems to be working as expected during debugging until I reach the devtools session, where I encounter the error "WebException: The re ...

"Encountered an issue while attempting to run the docker-compose script on AWS

Launching my application with sudo docker-compose up works fine, but when I try docker-compose up, it throws the following error: $ docker-compose up Traceback (most recent call last): File "urllib3/connectionpool.py", line 670, in urlopen Fi ...

How can I transfer files from a Docker container to the host?

When I needed to share data between a folder on the host and a container, I wanted a solution where changes made in either location would be reflected in real-time on the other. After some research, I found the perfect tool - Docker Run's -v argument. The ...

What is the best way to establish a connection between two services in a Docker-compose setup so that they are able to communicate with each

I'm new to Docker and facing challenges in connecting two separate services using docker-compose. I need to be able to write to a database and read from it. Additionally, each container should be able to ping the other one. When I run docker exec -ti node ...

Is it possible to utilize *.localhost as hostnames in Docker for developing intricate applications such as Next/Nuxt?

My current task involves setting up a Docker environment using the *.localhost format (like front.localhost and sdk.localhost), which browsers recognize as pointing to 127.0.0.1 without requiring manual host modifications. The issue I'm facing is with the ...

Encountering a Connection Refused Error (ECONNREFUSED) with Docker Compose and MySQL when using NodeJS

Setting up containers for my NestJS + TypeORM + MySQL environment using Docker Compose on a Windows 10 host is proving to be challenging as I keep encountering an ECONNREFUSED error: connect ECONNREFUSED 127.0.0.1:3306 +2ms backend_1 | Error: connect ECON ...

Custom Docker container running an Azure pipeline with npmAuthenticate task

I'm attempting to utilize the npmAuthenticate task in an Azure pipeline that is executing a script within a custom Docker container container: image: android_builder:37878 endpoint: sc-acr steps: - task: npmAuthenticate@0 inputs: workingFile: '. ...

docker-compose is encountering an issue where it is unable to recognize the node_modules directory created by npm

It seems like I'm not the first one to encounter this issue, but none of the solutions I've found seem to work for me. Here is my docker-compose.yml file: web: build: . volumes: - .:/src ports: - "3000:3000" And here is my Dockerfile: F ...

Accelerate the build process by storing packages in a Docker container cache

I have a great concept that is still a work in progress. Within my Dockerfile, the following code snippet can be found: FROM node:10 WORKDIR /app RUN "*cache node modules here*" RUN for instance, npm cache add foo bar baz COPY package.json . RUN npm i ...

Using Nginx and Express to deliver static content directly from a Docker container

My setup involves an Express API and an Nginx running in a Docker Container. The goal is to have Nginx reverse proxy regular requests to the API, while also serving static files like images directly. However, I'm struggling to determine the correct URI to ...

Error: Docker is experiencing a permission issue with creating the directory '/app/node_modules/.cache'

I came across a permission error while attempting to create a docker container within a React application. I tried looking at various community responses, but none of them seemed to work. After going through a related discussion, I attempted the foll ...

Selenium and Docker: Struggling to load a personalized Chrome user profile

Hey there, I posted an issue a couple of days ago, but it seems like it's not really considered an issue. However, my problem still persists, and I'm hoping someone can help me figure out what's going on :D You can find the detailed discus ...

Dockerfile unable to recognize environment variable

I'm currently working on a Vue application running with Docker, and I want to use environment variables to target specific project repos. However, when I try setting the env variables, they don't seem to be recognized in the Dockerfile. Can you help me tr ...

What is the best way to link docker containers together for optimal performance?

I am currently in the process of developing a web application that consists of three main components: A Node.js API A front-end web client that consumes the API Another Node.js service dedicated to data processing My goal is to establish communication b ...

Docker: Containers experiencing stalled HTTP requests when connecting with others

For testing my web apps online, I utilize a VPS. To manage multiple web apps on the same server, I rely on Docker. Below is my docker-compose.yml version: "3.7" services: gateway: build: context: ./gateway dockerfile: Dockerfile r ...

Encounter an error message stating "Request failed with status code 502 nginx in Next.js TypeScript."

After setting up Next.js typescript with Kubernetes NGINX Ingress, I encountered a problem where specific routes were returning a 502 error. For example, the route /test works fine, but /login does not. I'm unsure whether the issue lies with Kubernete ...

Leveraging Docker for concurrent execution of multiple web development environments

As the overseer of multiple web applications using the LAMP stack, my challenge lies in maintaining various versions of PHP and frameworks such as Wordpress and Symfony. My goal is to establish testing and development environments at home that mirror our p ...

Using the 'client-side rendering' and runtime environment variables in Next.js with the App Router

In the documentation for next.js, it's mentioned that runtime environment variables can be utilized on dynamically rendered pages. The test scenario being discussed involves a Next.js 14 project with an app router. On the page below, the environment ...

gRPC error: "unable to connect to the specified address" while running a NestJS application on Docker

I am encountering this particular error message when trying to run my NestJS application in a Docker container with gRPC: { "created": "@1616799250.993753300", "description": "Only 1 addresses added ou ...

Installing Npm packages offline within a Docker container

I'm currently facing an issue while attempting to set up node-red-contrib-influxdb in a node-red docker container on a computer without internet access. My setup involves a Windows machine where I've installed node.js, along with the node-red-contrib-influ ...

Error message "Vue CLI project setup encountering ENOENT error: file or directory does not exist"

I'm currently in the process of creating a new Vue.js app, and I've executed the following command: vue create client After that, I opted for the default template: default (babel, eslint) However, during the setup process, it abruptly stops with this e ...

Encountering a 503 error after deploying Flask on CloudRun

I encountered an issue while trying to deploy a simple Flask app that utilizes Google Bucket. Upon deployment, I kept getting error 503 - Service Unavailable. I'm unsure if I missed something crucial or what exactly I might be doing wrong. Any assistance ...

Connection to MongoDB in Docker is abruptly terminated upon the receipt of metadata

I am currently working on setting up a docker application with two containers: mongo app While the mongo container is functioning properly, the app container is unable to establish a connection with mongo. Neither the node.js app nor mongostat are able ...

Guide to conducting Drizzle Migrations in SQLite with Docker for a live database on a Virtual Private Server with Next.js

Planning to conduct a Drizzle Migration on Production through a VPS. Facing limitations with executing two commands pnpm db:migrate:prod and pnpm start simultaneously in a Dockerfile. Dockerfile # Seeking guidance on running `db:migrate:prod`. CMD [" ...

The Docker Angular container is experiencing difficulty connecting to the Express server container, despite the fact that they are both on the same network

In my current setup, I have an Angular application running on a Nginx server within a Docker container. The base image for this container is nginx:stable-alpine and its name is "admin-users-cont". This container is part of a Docker network named "tutorial- ...

Issue with esbuild not executing within docker compose configuration

Currently, I am new to using esbuild and struggling to set up a script that can watch and rebuild my files. Additionally, I need this functionality to work within a docker environment. Within my package.json file, the following scripts are defined: " ...

I am having trouble establishing a connection between two containers on Heroku

My web application is built using Node.js and MongoDB. After containerizing it with Docker, everything worked fine locally. However, when I tried to deploy it to production, I encountered an issue where the backend could not establish a connection with the ...

Issue encountered when attempting to assign `fontWeight` within `makeStyles` using `theme` in Typescript: Error message states that the property is not

Currently, within my NextJS project and utilizing MUI, I am attempting to define a fontWeight property using the theme settings in the makeStyles function. Oddly enough, this issue only arises when building inside a docker container, as building locally po ...

Failed to bind MariaDB with Node.js using Docker Compose

I have successfully set up a MariaDB/NodeJS environment using docker-compose: version: '3' services: app: image: node:alpine volumes: - ./:/app working_dir: /app environment: NODE_ENV: development ...

Using the digitallyseamless/nodejs-bower-grunt docker image to containerize npm and bower installations

I've been exploring the possibilities of using Docker to execute npm and bower install commands. Below is my setup: ./package.json { "name": "bignibou-client", "version": "0.1.0", "engines": { "node": "0.10.x" }, "devDependencies": { ...

Utilizing NodeJs to establish a seamless connection with elasticsearch

Recently, I have been exploring the option of updating my REST API to utilize elasticsearch. After some research, I came across the mongoosastic plugin, which appears to be a promising solution. However, I am having difficulty establishing a connection bet ...

I'm facing an issue where the React-Nodejs app frontend fails to load when using docker-compose up in my network, however,

My React Node.js application runs fine locally, but when I dockerize it and run docker-compose up, only the localhost page loads, not the network. I'm unsure where my configuration is wrong for the frontend and would appreciate any help! I have separate D ...

What are the steps to eliminate the package-lock.json warning while constructing a Node application image using Docker?

Exploring Docker to develop a compact Node.js application image, I aim to eliminate the warning provided below: npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_ ...

Delivering a node project directly from a docker container

As I navigate through the realm of node.js/frontend development, I find myself overwhelmed by the myriad of frameworks available. Currently, I have a node project that runs smoothly on my local machine. I've successfully implemented a basic proof of conce ...

The code threw an error stating: "Error: Unable to set a new value to the unalterable property 'children' of the object '#<Object>'"

Encountering internal server error in Next.js build with Docker when reloading all routes with getServerSideProps react: "17.0.2" next: "^11.1.2" Local setup and deployment without Docker works fine, but with Docker implementation, reloading pages leads ...