Questions tagged [docker-run]

214 questions
1
vote
1 answer

Is there a real use case of declaring more than one CMD in the dockerfile?

According to the doc: There can only be one CMD instruction in a Dockerfile. If you list more than one CMD then only the last CMD will take effect. Why would one list more than one CMD instruction? I don't really understand this guideline.…
Jim
  • 3,845
  • 3
  • 22
  • 47
1
vote
1 answer

Why is the env variable not set when entrypoint is echo on docker run?

Why is the environment variable not visible to the command that is run as the entrypoint? Examples: $docker run -it -e "name=JD" --entrypoint 'echo' ubuntu 'Hello $name' Hello $name $ docker run -it -e "name=JD" --entrypoint 'echo' ubuntu "Hello…
Jim
  • 3,845
  • 3
  • 22
  • 47
1
vote
0 answers

docker run: make the container command use it's own environment variable instead of the host's

Assuming that I set an environment variable in my Dockerfile like this: FROM ubuntu:latest ENV MY_NAME=YOYO When running docker run -it my_image bash I am able to access MY_NAME like this: root@dec16fb8dab1:/home $ echo $MY_NAME YOYO However, when…
Farzad Vertigo
  • 2,458
  • 1
  • 29
  • 32
1
vote
1 answer

Docker run parameters in Dockerfile

If I have a container that I run as follows: docker run -d\ --name thename\ --restart=always\ -p 80:80\ -p 2003-2004:2003-2004\ -p 8126:8126\ image_name How can I create a docker file so that the container runs exactly as above without…
Jim
  • 3,845
  • 3
  • 22
  • 47
1
vote
1 answer

Docker container outbound IP mapping

I have installed docker on a private cloud VM (RHEL 7.2) with a floating IP say 10.135.118.6 I also have a Java Play Application which talks to third party database servers. The database have white-listed the floating IP 10.135.118.6 so that my…
1
vote
1 answer

Docker: Timeout error when running images built with dependencies

My goal is to create a container where I can: Input data Process the data on an executable (.exe) file Output processed data I want to use NodeJS to handle the input/output using REST. So, I would need to install NodeJS on the container along with…
libzz
  • 589
  • 2
  • 10
  • 29
1
vote
0 answers

Connection refused while trying to connect one docker container from another

My question can be naive, but I'm new to development and docker, and couldn't figure out the solution. I have an image of GraphDB-Free which I can run as a docker container, and it runs on localhost:7200. I can access it in chrome also. Now I have…
Raees
  • 21
  • 1
  • 3
0
votes
0 answers

installing gitlab inside docker container stuck in loop of errors

I'm currently trying self-host a gitlab server. For this I'm following along the documentation [here]. What happens is that the installation process gets stuck in a loop, continuously repeating very similar log messages. What I did: I have the…
melon_maniac
  • 123
  • 4
0
votes
0 answers

I failed to send request to sandbox url with proxy in gitlab run, but the same could succeed at local run

my request code is mocha framework, in local run using vs code, just npm run test by manually setting the proxy (export http_proxy=**), it could succeed to get 200 status code,, but the same failed at gitlab runner please advice me on this. your…
0
votes
0 answers

Error: No such file or directoryline 2: /usr/sbin/nginx npm ERR! missing script: develop

I am using Strapi and making the docker build of the same but I am trying to run the build I am facing nginx error. : No such file or directoryline 2: /usr/sbin/nginx npm ERR! missing script: develop this is my docker file FROM…
Nectar Mind
  • 145
  • 2
  • 17
0
votes
0 answers

Executor start aborting - ERROR while executing docker command

I am working on an ML usecase in which I have to make a chat toxicity classifier. I have made the text classification model. Now I am trying to build and run it using Docker. I am using Flask and tensorflow model. DockerFile FROM python:3.8 # copy…
0
votes
0 answers

Docker run not working, unable to view R workspace image

I'm trying to set up the GeoMXAnalysis Workflow, Documented here. The way it works is I need to install a bunch of packages, download the github repo, and then use docker to view an R markdown file which walks you through the workflow. My problem is…
0
votes
0 answers

Docker can't find bind source path for entrypoint script, even though file exists

I'm trying to build a service (Google Cloud Composer, which is basically just Airflow) locally via Docker. However, I'm getting the following error message: │…
snark17
  • 349
  • 6
  • 15
0
votes
1 answer

Accessing aws credentials set as env variables in docker run command

Is there a way for AWS credentials passed as environment variables to the docker run command to be put to use for getting the caller identity details while the container is running? This is the docker run command being executed in the…
Sandeep
  • 1
  • 1
0
votes
0 answers

AWS User data script Docker-Run not working

I have installed docker and httpd on an instance and when I run sudo docker run -d -p 8600:8080 pengbai/docker-supermario in SSH, The command works but when I Restart the Instance with this user data(docker and httpd already…