Questions tagged [docker-run]
214 questions
7
votes
1 answer
includes invalid characters for a local volume name,. If you intended to pass a host directory, use absolute path
I ran docker run -v and it shows error as invalid characters in local volume name.
"If you intended to pass a host directory, use absolute path"
also is printed in the terminal.
Tried replacing -v with --mount but gives error on parameters
sudo…

user9646274
- 103
- 1
- 1
- 6
7
votes
1 answer
Docker alternative to --network host on macOS and Windows
I have two docker containers:
database
app that consumes the database
I run my database container like this:
docker run --name my-db -p 127.0.0.1:3306:3306 my-db-image
And my app container like this:
docker run --name my-app --network host -it…

Francesco Borzi
- 56,083
- 47
- 179
- 252
6
votes
1 answer
Dockerfile COPY vs "docker run ... cp"
We have a build pipeline that first does a docker build using a dockerfile. That dockerfile has a number of COPY commands. We also have a later step that does a docker run, with 'cp' command, as follows:
docker run --volume /hostDirA:/containerDirB…

GaTechThomas
- 5,421
- 5
- 43
- 69
6
votes
2 answers
"Permission denied" on file when running a docker container
I have a file that I can't edit but needs to run on in a docker container. Because the file doesn't have an extension, I have to use chmod for setting the file executable. But after I build the docker image from the docker file I always get a…

Niklas
- 61
- 1
- 1
- 4
5
votes
1 answer
Configure docker run to use ssl / https / tls
Is there a way to configure docker run to use https? Something like:
docker run --https --certs xyz myimage
or do you have to configure that stuff within a Dockerfile/image? Likewise for TLS.
docker run --tls --certs xyz myimage
One advantage…
user5047085
5
votes
2 answers
docker container exits on entry points
I am trying to run a docker container through Dockerfile with docker run command. Following is my Dockerfile.
FROM python:3.6
# for imaging stuff
RUN apt-get update
RUN apt install libmagickwand-dev
# Create app directory
RUN mkdir -p…

Shoaib Iqbal
- 2,420
- 4
- 26
- 51
5
votes
2 answers
ECS/Fargate container definition command arguments
We are trying to start a fargate container on AWS ECS. In the container definition we have
"command": [
"/bin/bash",
"-c",
"\"envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx…

David
- 7,652
- 21
- 60
- 98
5
votes
2 answers
How to convert a docker run -it bash command into a docker-compose?
Given the following command:
docker run -dit -p 9080:9080 -p 9443:9443 -p 2809:2809 -p 9043:9043 --name container_name --net=host myimage:latest bash
How to convert it into an equivalent docker-compose.yml file?

Alessandro C
- 3,310
- 9
- 46
- 82
4
votes
0 answers
How to specify both uid and username on `docker run` command?
To start a docker container with the current user I can call docker run with the --user parameter like
docker run --user $(id -u):$(id -g) myimage
However that leaves the user inside the container without a name which inhibits the execution of some…

radlan
- 2,393
- 4
- 33
- 53
4
votes
3 answers
DOCKER How do I set an password and username on docker run with an windows image?
What I want
I want to set the username and password when I start the container for example:
docker run --password=mysupersafepw --user=myusername mcr.microsoft.com/windows/servercore
What I've got
At the moment the user and password is hardcoded in…

ButterBetzi
- 51
- 1
- 1
- 6
4
votes
3 answers
In a dockerfile, can we have multiple RUN commands into one RUN command?
I understand that each RUN command creates a layer. Suppose I have the following RUN commands:
RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade setuptools
RUN pip install -r requirements.txt
I wish to run all the command…

variable
- 8,262
- 9
- 95
- 215
4
votes
1 answer
How to execute ps1 script using docker run command?
I need to use the official PowerShell Core Docker image to run a Docker container and make it execute a PowerShell script file.
I know it can be done using a Dockerfile and Docker build, but can't use that in this case.
From reading docs I came up…

robliv
- 1,351
- 3
- 15
- 30
4
votes
0 answers
How to copy entire folder from local machine to Amazon Sagemaker or vice-versa?
I want to copy a folders/files from my local machine (MAC) to the docker container in Amazon Sagemaker .
I tried using scp commands to copy from local to sagemaker,
for folder
scp -r -i …

Eyshika
- 1,041
- 1
- 11
- 18
4
votes
1 answer
Unable to docker run
I am trying to setup an image of the osrm-backend on my docker. I am unable to run docker using the below commands (as mentioned in wiki)
docker run -t -v ${pwd}/data osrm/osrm-backend:v5.18.0 osrm-extract -p /opt/car.lua…

Naveed Butt
- 2,861
- 6
- 32
- 55
3
votes
2 answers
RShiny deployment with Docker - Execution halted due to application package not being found?
I'm relatively new to RShiny, Golem and Docker. However, I've built a little analytics dashboard with the Golem framework that I'd like to deploy locally using Docker.
I have been able to successfully build an image, but can't seem to get the…

Jaimee-lee Lincoln
- 365
- 1
- 3
- 11