Questions tagged [docker-run]
214 questions
1
vote
1 answer
Docker Run executing shell command can't access PATH environment variable
I'm using an official image from Microsoft which contains SQL tools used to interact with Microsoft SQL Servers. If I run the container interactively, I can run sqlcmd at the command line without any issue, because it is in the PATH variable:
$…

Farrukh Waheed
- 2,163
- 2
- 29
- 59
1
vote
1 answer
If docker run has multiple -e VAR=VALUE options for the same VAR, which one is used?
If I have docker run ... -e VAR=x ... -e VAR=y ..., what is the value of VAR in the container? From a quick test it looks like the last one is used, but is this guaranteed anywhere in the documentation?

Alexey Romanov
- 167,066
- 35
- 309
- 487
1
vote
0 answers
How to gain visibility of the output of a bash script executed from a Dockerfile?
I received this error message which means something is erroring inside a bash script executed by the Dockerfile.
As an example, if something inside test.sh errors:
RUN test.sh
# 16 ERROR: executor failed running [/bin/sh -c test.sh]: exit code:…

stevec
- 41,291
- 27
- 223
- 311
1
vote
0 answers
Cannot exit from docker logs -f in jenkins pipeline
By adding this command docker logs -f , able to print the docker logs, but it is not exiting from this command after the server is running. I have other commands that have to be run after the docker run, but the logs command is not…

Parkjin
- 11
- 4
1
vote
0 answers
When running a docker container with volume flag (-v), I am getting an error. EACCESS: permission denied. ERROR in [eslint] EACCES: permission denied
I am learning Docker and I am stuck with this permission issue.
I have created a simple React app and created its image.
Dockerfile I used
Dockerfile:
FROM node:alpine
WORKDIR '/app'
COPY package.json .
RUN npm install
COPY . .
CMD ["npm", "run",…

Vishal Gupta
- 21
- 4
1
vote
1 answer
Variable passed by 'docker run' to CMD of Dockerfile is not resolved
Can anyone explain why is the environment variable passed by
docker run --rm -it -e APP_PORT=80 -p 8080:80 my_container
to CMD in Dockerfile is not resolved in following cases:
...
ARG APP_PORT
ENV APP_PORT=${APP_PORT}
...
CMD…

m19v
- 1,800
- 4
- 11
- 26
1
vote
3 answers
Gitlab CI can't establish connection on port that docker is running
I spent a whole day to this point, still struggling, the error says "Failed to connect to localhost port 9000 after".
I have a Nodejs app, which uses Postgres as DB. I was able to connect them together. And, the app runs in attach mode very well.…

Dan
- 681
- 2
- 11
- 23
1
vote
1 answer
Printing command line args (java program) when using docker run
I have a java program which prints command line arguments
public class Sample {
public static void main(String[] args) {
System.out.println(args[0]);
System.out.println(args[1]);
}
}
And I have a Docker file as…

John
- 181
- 2
- 12
1
vote
1 answer
Why both CMD and entrypoint defined in some images?
I have seen some images that based on the inspect have both CMD and ENTRYPOINT set.
What is the idea of this? What use cases are served when both are set?

Jim
- 3,845
- 3
- 22
- 47
1
vote
0 answers
standard_init_linux.go:228: exec user process caused: no such file or directory
I started with a functioning Docker clone of a months-old version of an existing project. After integrating all the changes made in the intervening months, the clone runs locally, and builds when docker-compose build is executed. However, when…

JAF
- 385
- 1
- 2
- 12
1
vote
1 answer
What's is the different between docker volume with mountpoint docker volumes
What's is the different between docker volume with mountpoint docker volumes, please see the attached picture
Can someone help me?
Two volumes, different configuration

Pini
- 13
- 3
1
vote
1 answer
How to keep docker container settings given by run command arguments?
I start a container from a docker image using docker run command + many arguments, like:
docker run -d --name=ubu2 --restart=always --pids-limit 400 --memory=3g --memory-swap=6g --cpus="2.0" -p 127.0.0.1:8585:8585 -v /apps:/apps ubuImage
when I…

gai-jin
- 653
- 2
- 10
- 24
1
vote
3 answers
docker run gives Error: '' is not a valid port number
I am new to docker, trying to run a pulled docker image.
docker images gives this:
REPOSITORY TAG IMAGE ID CREATED SIZE
openmined/grid-network development f760520b2550 8 days ago …

Sunil Singh
- 56
- 1
- 5
1
vote
1 answer
Multi stage docker build of a golang application can't find the .env file
I'm trying to debug a multi-stage docker build for a golang app that is driving me nuts.
The docker file is as follows
FROM golang:1.15-alpine as build
RUN apk add --no-cache git
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux \
…

Peter Nunn
- 2,110
- 3
- 29
- 44
1
vote
0 answers
(HTTP code 500) server error - cannot mount volume over existing file, file exists
I have three custom containers in dockerhub. I created them, committed and pushed to my docker hub account. Now I pull the containers and run one by one, and one of them is not working.
This container is based on ngnix image but with custom…

Javier Fernandez
- 11
- 1