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.

The error 'sh: dist: unknown operand' occurs when Doclerizing a Vue App

After following the Vue.js Docker tutorial, I encountered an unusual error message. 'sh: dist: unknown operand' This is the content of my Dockerfile: FROM node:lts-alpine RUN npm install -g http-server WORKDIR /app COPY package*.json ./ RUN npm insta ...

Creating a custom Docker image with a specified version of the Node package installed

My goal is to create a Docker image with a node package installed. If I hardcode the package version in the Dockerfile, everything works fine (@14.0.0): FROM stefanscherer/node-windows:12.16.1-nanoserver-1909 RUN npm install -g @sitecore-jss/<a href="/ ...

The next.js docker error I encountered was related to getServerSideProps, showing a connection error with code "connect ECONNREFUSED 172.25.0.2

I have two separate docker-compose.yaml files. One is for the backend which includes its database, nginx, and node.js, while the other one is for my Next.js frontend application. FRONTEND: services: bsb_front: image: bsb_front container_name: b ...

Having trouble installing npm on my Laradock environment

After setting up a Laravel project with Laradock, running npm install resulted in the following error: > <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5f31303b3a722c3e2c2c1f6b7166716f">[email protected]</a> i ...

Node.js vulnerability labeled as CVE-2021-38628

Description: Enhance security measures by disabling the use of TLSv1.0 protocol and transitioning to a more secure option like TLSv1.2. To perform a manual test, utilize the following openssl commands: openssl s_client -connect ip:port -tls1. If succes ...

Exporting the flutter PATH can cause conflicts with the functionality of docker cli and npm

Hello, I've encountered an issue that is puzzling me. After installing Flutter and adding its path to my .zshrc file as shown below: export PATH={$PATH}:/Users/matteo/Documents/flutter/bin I started experiencing difficulties with Docker and/or Npm ( ...

Using Docker to containerize a Vue single-page application, with the flexibility to switch API URLs based on the environment

I have a dockerized Vue.js application that communicates with an API hosted on a java backend. The API URL varies depending on the environment - it's app.example.com/api in production, staging.example.com/api in staging, and localhost:8081 when running loc ...

Unable to access application in Laravel 7 Docker deployment

Two months ago, my two dockerized Laravel apps were functioning properly. However, now when I attempt to log in, the app fails to authenticate. Interestingly, unauthenticated routes work without any issues. The database is operational, and even migrations ...

Encountering the error "oom kill count retrieval failed" on a Gitlab runner instance provisioned using the Gitlab Operator for a vuejs App

Currently, I am in the process of setting up a gitlab ci/cd pipeline for a vuejs application. The Gitlab runner has been provisioned using the Gitlab operator within an Openshift environment. In order to get a docker image of the application, I am utilizin ...

Unleashing the Power of NPM Build with Secret Integration

When working with NEXTJS, I found that using environment variables for the build process is necessary, but not afterwards. Initially, I used ARQ, but found it to be less secure (ephemeral). However, I am having trouble understanding the documentation on ma ...

Stalled progress during Docker build while running npm run build

I encountered an issue while trying to build a docker image, where the process got stuck at the "npm run build" step. Even though the message indicated that the build was successful, it failed to proceed further. My Dockerfile uses node:16.13.1 as the bas ...

Testing WebdriverIO in a Docker environment

My current goal is to access the application running on a single container via webdriverio for testing purposes. I have successfully achieved this locally by following these steps: yarn start // initiates the app on htpp://localhost:3000 yarn test // exe ...

Does this Docker configuration successfully set up a React.js build to run on port 5000?

Recently, I encountered an issue with my React.js app after dockerizing it. Everything was running smoothly until I updated the node version to 17 and began experiencing errors. To resolve this, I reverted back to using node version 16 in my docker image. ...

Can Next.js be integrated with Docker and Nginx for a seamless development environment?

I have a nextjs project that I want to run using Docker and nginx. The setup requires nginx to connect to nextjs behind the scenes, with only nginx being able to communicate with nextjs (users must talk to nginx to access nextjs). Given the typical nextjs ...

Python Script Running in Docker Encounters Errors with Missing Files, Failing to Execute

For the past year, I've been successfully running a python script within a Docker environment without any major issues. However, after updating to Docker version 4.25.0 about a month ago, my python script stopped working properly. I managed to fix severa ...

NextJS fails to load on iPhones connected to cellular data

I recently completed the development of a NextJS web application using React on my MacBook Air M1. After compiling a Docker image to ensure compatibility with amd64 processors, I deployed it to an AWS EC2 instance running Ubuntu 20.04 on an x86_64 processo ...

Encountering difficulty reaching the web server while attempting to dockerize Hapi JS

I have been working on a web application using the Node JS web framework, Hapi JS. Unfortunately, I am facing some issues with dockerizing my application. My process began by setting up npm for the project with the command: npm init I then proceeded to ...

Upon executing, the Docker container is terminated when using the command "sh -c"

Currently, I am experimenting with running a web server from a docker container, starting locally. I am taking it step by step to grasp the various components involved. Dockerfile: FROM node:12.2.0-alpine as build ENV environment development WORKDIR /ap ...

Behat Mink fails to locate file during upload submission

I'm currently testing image uploads using Selenium/Mink with Behat in a Symfony application running within a Docker container. Instead of using $driver->attachFileToField('#id-of-input', $filePath), I am attaching the file directly to th ...

What is the process for configuring simultaneous services on CircleCI for testing purposes?

My current project involves running tests with Jasmine and WebdriverIO, which I want to automate using CircleCI. As someone new to testing, I'm a bit unsure of the process. Here's what I've gathered so far: To run the tests, I use npm tes ...

Deploying an npm package to Verdaccio using GitLab CI within a Docker environment

When attempting to publish a module on my private Verdaccio repository from Gitlab CI running in Docker, I encountered an issue. Following this tutorial, I generated the token on my host since the container in which the jobs run does not exist until the pi ...

Having trouble constructing a selenium image within a Docker container

As a newcomer to Docker, I am attempting to create a minimal Selenium framework with just one test inside the container. The test runs smoothly on my local machine, but encounters failure during execution within the container when trying to run the tests u ...

What is the process for attaching local codes to a container in Docker?

I am dealing with a simple code base that includes the following files: Dockerfile docker-compose.yml package.json server.js Here is my Docker file: FROM node:alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app RUN npm ...

Using Docker with Next.js allows me to access the website exclusively through port 3000

When using Next.js with Docker, I access the website by going to "site.com:3000". But ideally, I would like to simply go to my site by visiting "site.com". I'm puzzled as to why 3000 is being appended at the end. It appears tha ...

The Node Express.js app is functioning properly when run locally, but displays the error "Cannot GET /" when running in a Docker container

My Node application has an Express.js server defined like this: const express = require('express') const SignRequest = require('./SignRequest/lambda/index.js') const VerifyResponse = require('./VerifyResponse/lambda/index.js') const port = "3000"; const ...

A step-by-step guide to effectively dockerizing the development and production environments for a Next.js 13 application directory

My development Dockerfile is set up as follows: FROM node:18-alpine WORKDIR /app # Installing dependencies based on the preferred package manager COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN \ if [ -f yarn.lock ]; then ya ...

Error occurs while trying to run npm install within a docker container

When attempting to execute npm install within a docker container, the command I used was: docker run -it --rm -v $(pwd):/src cthulhu666/yeoman npm install Unfortunately, it consistently fails with an error message similar to this: 85351 error node v5.5. ...

Is it time to swap out "localhost" with the service name in Docker?

I have successfully dockerized my reactjs app and express app. Check out the docker-compose.yml file I used: version: "3" services: client: image: react-app build: ./client ports: - "3000:3000" volumes: ...

Issues with Docker port publishing on Windows 10

Recently, I've been diving into the world of Docker and ran into an issue with port publishing from a docker container to the host machine. To start off, I built an image for a simple React app (using Vite) by running the command docker build -t react-app ...

Build in Docker unsuccessful | Error code 4294967295 received from running the command '/bin/sh -c node -v' on Windows platform

Here is a simple Dockerfile I am attempting to create on the Windows Docker platform: docker build . -t nishantt95/my-node-app FROM node:16.14.2 WORKDIR /app COPY package*.json ./ RUN npm i COPY . ./ EXPOSE 3000 CMD ["npm", "start"] ...

Apache Airflow: ImportError - Couldn't find the module named 'selenium'

Currently, I am running apache-airflow locally using docker. However, I encountered an issue when trying to import selenium into one of my dags that involves web scraping data on a regular basis. Despite running the pip install command in the console and r ...

The backend service of NextJS encounters issues when deployed on Docker

After successfully building and running a NextJS App with both frontend and backend functionalities locally using yarn dev or yarn build followed by yarn start, I encountered issues when trying to run it on Docker. Despite following the instructions from t ...

The Selenium Docker video fails to function when the network mode is set to 'host' in the Docker Compose configuration

The docker-compose file is configured with a chrome-standalone image and another node (named test) as the test runner. The Cloudbuild.yaml file triggers the test, which works successfully. Below is the docker-compose file: version: "3" services: ...

Setting up a NextJS development server in a docker environment with networking

Currently, my development environment consists of a NextJS app running in a docker-compose setup under the name frontend. The backend is powered by an expressjs app known as backend. In my NextJS app, there's an environment variable that specifies t ...

An AggregateException has occurred due to multiple errors arising. The main issue revolves around the failure to initiate the 'npm' application. To troubleshoot this problem and resolve it, further actions are

Experiencing frustration with Visual Studio on Mac when using Docker due to numerous errors. The project involves ASP.NET Core 2.1 with Angular 6 on a Docker image. The project builds successfully, but encounters issues when trying to run as detailed below ...

Having trouble connecting to the database server on `postgres` port `5432` using an AWS-RDS URL

Tools in my arsenal: nextJS; prisma; postgresql; docker; I've been attempting to establish a connection with the database by using this URL: DATABASE_URL="postgresql://USER:PASSWORD@HOST:5432" The database in question is an AWS RDS Postgr ...

Creating a Docker image for a Vue.js application

I'm facing an issue while trying to build a docker image for my Vue.js app. Currently, I have a Vue.js application and I am looking to create a docker image for it. Here is the content of my Dockerfile: FROM node:7.7.2-alpine WORKDIR /usr/app COPY pa ...

Exploring the use of Node.js exclusive modules in Docker containers

I have a nodejs project that includes references to a module I developed and hosted in a private Github repository. The dependencies listed in the package.json file are as follows: "dependencies": { ... other stuff ... "my_module": "git+https://gi ...

During the Docker build process, the NextJS npm run dev command searches for the .next folder. However, the .next folder is

Recently, I encountered an issue with my Docker Compose setup for running my NextJS app in development. Everything was functioning smoothly until something unknown happened. Now, when the Docker image executes the npm run dev command, I am presented with t ...

RSelenium: What is preventing me from inputting a password into this (Java?) login form?

In the midst of my web scraping endeavors, I have encountered a slight hiccup when trying to extract data from this particular website using RSelenium. While I've had success sending text to various elements on the page, the login field has proven to ...

Encountering an issue when starting a Node.js/Swagger application using pm2 within a Docker environment: Unable to

1. Overview: I successfully developed a basic application using Node.js, Express, and Swagger by following this informative tutorial, along with the help of generator-express-no-stress. However, when I attempt to run the application within a Docker contai ...

Engaging storytelling within the boundaries of a Docker container

I have a unique docker container that is specifically designed to serve the node.js environment. It follows a similar configuration as explained in this informative article. However, I am interested in creating my own project. Is there any way to execute t ...

Error message: Unable to instantiate cp in Angular 17 application while building with npm run in docker container

After creating a Dockerfile to containerize my application, I encountered an issue. When I set ng serve as the entrypoint in the Dockerfile, everything works fine. However, the problem arises when I try to execute npm run build. Below is the content of my ...

My attempts to implement multi-container service deployment using NextJS and a backend node app have been unsuccessful

Currently, I am delving into the world of docker. Within my repertoire, I possess a mix of a next.js app and a node.js app. Within my next.js application, specifically in page.tsx, I have incorporated a call to my backend API. export const revalidate = 0; ...

Switching the default port for a Vue.js application running in a Docker container

I am currently in the process of changing the default port for a Vue.js app running on docker. I have experimented with both examples provided in the official documentation, which can be found here. For instance, I have a Dockerfile using http-server: FR ...

Having trouble accessing the text file from within the docker container

Recently, I started using docker for my project which involves reading text files stored in the resources folder. Below is the Dockerfile configuration: FROM python:3.9 WORKDIR /event_listener COPY requirements.txt . RUN pip install -r requirements.txt ...

When utilizing docker-compose, the Node application encounters difficulty connecting to Redis

Currently, I am setting up my development environment for a node app on Ubuntu using Docker. Below is the content of my docker-compose.yml: version: "2" services: redis: image: redis ports: - "6381:6379" volumes: - /var/lib/thinkl ...

Issue with Loading Images, Js, and Css After Build: All Files Returning 404 Error

As I endeavor to launch my latest 13 app, everything seems fine during the build process with no errors. However, when attempting to access the app, only HTML content appears, and a 404 error is displayed for Js, Css, and images (as evident in the network ...

Utilizing Aldryn cloud on a Windows 10 system with the integration of Hyper-V and the Beta version 1.12 rc2 of Docker

Looking for help setting up Aldryn Cloud Solution on Windows 10 with the latest Docker beta and Hyper-V. When running the command docker-compose -f C:\Users\Me\project\docker-compose-windows.yml build, I encountered errors related to np ...

Docker-compose encountering difficulty executing shell script (npm / ng serve) due to inability to locate specified directory

I've configured my docker-compose file to handle the deployment of an Angular-CLI frontend and a directory called scripts. www: build: ./www volumes: - ./www/frontend:/app - ./www/scripts:/scripts command: /scripts/init-dev. ...

Node-Sass Errors Occurring During Docker Compose Up Build

Every time I attempt to construct my docker container using the docker-compose up --build command, a multitude of errors surfaces. The reoccurring issues with node-sass and node-gyp persist despite exhaustive searches for solutions. System Specs MacOS 11 ...

What is the process for modifying code within a Docker Container?

My Docker and Containers knowledge is very limited, along with understanding VM concepts as a whole. I grasp the idea that VMs and Dockers help package all application dependencies into a single component for easy deployment on compatible cloud platforms. ...

Creating a DockerFile for Next.js deployment in Google Cloud Build on GCP

This Dockerfile is based on the recommendations provided in the official documentation. # To ensure dependencies are installed only when necessary FROM node:alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a ...

Encountering Issues While Installing TA-Lib on Debian Linux Dockerfile

Struggling with installing TA-Lib in a Dockerfile based on python:3.10.13-slim-bookworm. Despite following various examples, I continue to encounter errors: https://dev.to/lazypro/build-a-small-ta-lib-container-image-4ca1 https://github.com/deepnox-io/do ...

The connection between NodeJS and a postgres database is not functioning properly

Here is my app.js file: var express = require('express'); var app = express(); var uuid = require('node-uuid'); var pg = require('pg'); var conString = process.env.DB; // "postgres://username:password@localhost/database& ...

Customize the Node stack trace paths for Docker container compatibility

When developing Node applications in Docker containers, I usually bind-mount my source into the container at a location like /usr/src/app. If an error occurs and a stack trace is thrown, it typically looks something like this: TypeError: Cannot read prope ...

Error: Laravel Sail fails to establish a connection with Dusk and Selenium, resulting in a

Having set up Laravel with Sail, I decided to automate testing with Laravel Dusk. Following the instructions in Dusk Documentation and Sail + Dusk Installation, everything seemed right until running the default test which resulted in an error message: Test ...

Unable to locate the 'drizzle-orm' package within the Docker Container despite executing npm install in the Dockerfile

I set up all the dependencies in my Dockerfile using npm ci as shown below. Dockerfile FROM node:20-alpine AS base # 1. Install necessary dependencies FROM base AS deps RUN apk add --no-cache libc6-compat WORKDIR /app COPY package.json yarn.lock* packag ...

"Error: The dist directory is missing in the Angular Docker File

I am in the process of Dockerizing an Angular project and here is my Dockerfile: # 1. Building the Angular app using Node.js FROM node:12 as builder WORKDIR /app COPY package.json package-lock.json ./ ENV CI=1 RUN npm ci COPY . . RUN npm run build-web -- ...

Interacting with various Node.js APIs from a React frontend

Hey there! I'm currently working on a project that utilizes Node.js (Typescript) for the backend and React with Express for the frontend. The backend consists of 3 docker containers, each assigned to different ports - 1 for Postgres, 2 for ServiceA, and 3 ...

Build a Docker container for a project that requires utilizing yarn link for dependencies

While working on my NextJS project, I made the decision to utilize yarn as my package manager and utilized yarn link for import aliases/absolute imports. This feature of yarn is quite handy and is recommended for managing aliases within a project. However, ...

Upon deployment, Dokku mistakenly categorizes my Node.js application as a Go app

After creating a Procfile with the following contents: web: node web.js I updated my package.json file as follows: { "name": "app-express", "version": "0.0.1", "private": true, "description": "web panel", "main": "web.js", "scrip ...

The Next.js application, running within a Docker container, is experiencing difficulties loading static image files from the public directory

I am facing an issue while attempting to run a Next.js app locally inside a Docker container. Everything works fine when I run the container, except for my image files not rendering on the page. Upon inspecting with developer tools, it shows a failed netwo ...

PyCharm 2022 is facing difficulties in establishing a connection with the Docker service, as it seems unable to locate

I recently upgraded to PyCharm 2022 and I'm having trouble configuring a Docker Python interpreter. Despite the fact that the remote Docker service is up and running (and I have a pro license), PyCharm seems unable to locate it: Loaded: loaded (/lib/syste ...

Launching Node and Mongo with docker-compose fails to initiate both services

Issues and Errors: When running docker-compose run mongo, Mongo container starts successfully However, when running docker-compose run iotmap or docker-compose up, only the node container starts but not the Mongo container 1a) Running docker-compose ps ...

Having trouble setting up my Next.js application on Docker platform

I am currently working with a VPS running Ubuntu 22.04 and my goal is to create and run a Next.js application within a Docker container. Instead of having NodeJS installed directly on Ubuntu, I want the node:18-alpine image to handle all the necessary fun ...

Automating the execution of `npm run dev` for a React Vite application running within a Docker environment

I currently have a setup where I am running a Vite React app with a Flask API inside Docker using WSL 2 and docker-compose. However, I find myself manually executing certain commands in order to access my React app in the browser: docker exec -it vite_dock ...

Problem Encountered: NestJS Microservice Compatibility Problem with Docker

I have been working on setting up a NestJS micro-service and connecting it to a client gateway using docker containers. Everything runs smoothly when I test it locally, but once deployed on docker, I encounter the following error. I have separate docker fi ...

Setting up `ng serve` to detect changes in a containerized Angular 2 application

Currently, I am 'dockerizing' an existing Angular 2 application that is being run on angular-cli version 1.0.0-beta.31. I am facing difficulties in configuring ng serve to automatically reload my app whenever a file in the working directory is updated. As ...

Issue [ERR_PACKAGE_PATH_NOT_EXPORTED]: The subpath package './lib/parser' is not specified in the "exports" section of the /usr/app/node_modules/postcss/package.json file

After running a docker-compose up command to build my project, I encountered an error: node:internal/errors:464 ErrorCaptureStackTrace(err); ^ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/parser' is not defined by "expor ...

Dockerized Nginx: Struggling with location configuration issues

Here is the docker file: FROM nginx:1.17.4-alpine # copy artifact build from the 'build environment' COPY ./dist /usr/share/nginx/html/ COPY ./default.conf /etc/nginx/conf.d/ # expose port 80 EXPOSE 80 # run nginx CMD ["nginx", "-g", "daemon off;"] The ...

Error: Unable to establish connection with Docker Postgres Server

I'm facing an issue while attempting to execute a docker container with postgres and connect to its localhost through my application. Unfortunately, I keep encountering the following error message: UserRDD$ docker run -i --rm -e PGPASSWORD=12qw --net ...

Executing a Java program within a Docker container with the help of dockerode

I'm looking to send Java code as a string to an API for execution in a Docker container and then retrieve the console output. While I have successfully done this with Python, the process is different for Java since it needs to be compiled before runni ...

Encountering difficulties in generating a Docker image for puppeteer

I am currently in the process of building a Docker image using this docker file FROM node:18 # To support major charsets such as Chinese, Japanese, Arabic, Hebrew, Thai, and others, we need to install the latest Chrome dev package and fonts. RUN apt-get u ...

What could be causing the `npm: not found` error to appear when attempting to update the version of the Wordpress Docker image?

After encountering a challenging question, I was able to successfully resolve it Here's the situation: I have a Dockerized Wordpress site with Node.JS and NPM. The Dockerfile is structured as follows: FROM composer:2.5.8 as composer FROM wordpress:6. ...