Questions tagged [docker-entrypoint]
180 questions
0
votes
2 answers
Dockerfile entrypoint with runtime args not working as expected
I'm pretty new to Docker and I'm trying to Dockerize a particular tool that is difficult to run on different platforms. For some reason the ENTRYPOINT and CMD commands are not working as I would expect.
What is baffling me is that when I run a…
0
votes
1 answer
Access dockerfile ENV variables in entrypoint
I have a dockerfile that declares some environment variables that are being used later in the entrypoint, but the entrypoint never picks up the values for those variables. I tried the shell form but looks like its not doing anything. Here is my…

Ashley
- 1,447
- 3
- 26
- 52
0
votes
2 answers
How to start single process using service script passed to ENTRYPOINT
I am passing the service script to ENTRYPOINT. The service is started but exited.
I have to start a process per container using service script from ENTRYPOINT or CMD. This way, I can reload the configuration inside the container using service…

intechops6
- 1,007
- 4
- 22
- 43
0
votes
1 answer
MongoDB docker-entrypoint issue
MongoDB docker-entrypoint ignoring custom script for creating user and database.
I've tried on many ways. Here is one of my configuration.
Solution 1
docker-compose.yml (version 1)
version: '3.2'
services:
erste-mongodb:
build:
…

Heril Muratovic
- 1,940
- 6
- 25
- 46
0
votes
2 answers
Add arguments to entrypoint/cmd for different containers
I have this simple node.js image:
FROM node:12
USER root
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm i --production
COPY . .
ENTRYPOINT node dist/main.js
ultimately, I just want to be able to pass different arguments to…

Alexander Mills
- 90,741
- 139
- 482
- 817
0
votes
2 answers
Add Root password and create Application User on MongoDB Docker container on startup
everyone,
I'm having a hard time setting up a MongoDB container to have root password and creating a new user with less privileges (that will be my application user) automatically.
Ideally I should have only some scripts and a docker-compose…

Victor Ferreira
- 6,151
- 13
- 64
- 120
0
votes
0 answers
Docker: exit with custom exit codes
I have below Docker cmd:
docker run -it -p 27017:27017 -v /Users/john/db/:/data/db --name k1 mongo
When I run above command, I want to precheck whether "/Users/john/db/" folder path already exists or not. If it does not exist, then I want to throw…

deadMan
- 35
- 1
- 7
0
votes
1 answer
Docker container with console app inserts commands inifitely
I have a Dockerfile that builds an image containing a custom console application:
FROM ubuntu:bionic
# Some non-relevant steps...
CMD bin/my-console-app
my-console-app is a simple console app that, while it runs, it normally gives you the…

Francesco Borzi
- 56,083
- 47
- 179
- 252
0
votes
1 answer
docker-compose run scripts when container is initialized
I am new to docker. I am on a windows 7 machine and using docker toolbox.
I am trying to write a docker-compose.yml for MySQL which creates a database and runs 2 scripts (create table and insert)
version: '3'
services:
mysql-image:
image:…

tilik09
- 1
- 3
0
votes
1 answer
Does Php-fpm can process a cli script? What is happening inside official docker php?
I am using official Docker Php-fpm (https://github.com/docker-library/php/blob/master/7.2/alpine3.8/fpm/Dockerfile) and official Nginx Image for my php website. I have configured Nginx to talk to php-fpm over port 9000. The entrypoint of the docker…

SkyRar
- 1,107
- 1
- 20
- 37
0
votes
2 answers
run uwsgi after official nginx container start?
I just write a customized container dockerfile including CMD["uwsgi", "--ini", "uwsgi.ini"] based on nginx official image
And I see there's a CMD["nginx", "-g", "daemon off"] in the end of Dockerfile of this nginx official image.
That should means…
0
votes
1 answer
Unable to ping from one container to another container connected in the same network
I created two containers and connected them to a same network. But when I use the commands:
docker exec -ti docker-client1 sh
ping -c 2 docker-client2
I get the error:
"sh: 1: ping: not found"
I have used the container names instead of IP…

Leksh
- 3
- 1
0
votes
1 answer
Docker Entrypoint Error with --user option on docker run
I discover this problem with a docker run when i want just that my container write as not root files.
When i use this kind of command (where the entrypoint is overided) i don't have any problem :
docker run -u `id -u $USER` --entrypoint bash -it…

DalinDad
- 103
- 1
- 14
0
votes
1 answer
How to use CMD or ENTRYPOINT with based image that uses ENTRYPOINT
I am using base image ibmcom/mq which uses ENTRYPOINT to execute its process:
ENTRYPOINT ["mq.sh"]
If in my Dockerfile I use CMD the parent image works fine, but my CMD doesn't seem to be executed. If in my Dockerfile I use ENTRYPOINT my command…

OZG
- 509
- 7
- 19
0
votes
1 answer
how to add dynamic port no in the gunicorn docker?
I am trying to give dynamic port, thread, and workers while running the docker image but i am getting an error
[root]# docker run -it -p 8080:8080 --env-file ./env.list ff50c09659a0
/usr/bin/gunicorn: line 4: import: command not…

Rituraj kumar
- 349
- 1
- 4
- 15