Questions tagged [docker-entrypoint]

180 questions
0
votes
2 answers

How to export parsed json variables in docker entrypoint.sh?

In AWS ECS, when SECRET is defined in the ECS task definition, the $SECRET variable ends up in the container as a json string. SECRET={"secret1":"value1","secret2":"value2"} I'm able to parse out and export the json string to individual environment…
Aub_C
  • 13
  • 3
0
votes
2 answers

Docker: can a cmdline argument be appended to a shell built-in command args?

I want to create a docker image with a cmdline-specifiable exit code. From this question, I learned that I must use exit as an argument to sh because it is a shell built-in command, not an executable: How to make a docker container exit with a…
StoneThrow
  • 5,314
  • 4
  • 44
  • 86
0
votes
1 answer

docker-entrypoint-initdb.d/* files ignored on docker-compose first run

I try to setup a Postgresql db in my docker-compose and it worked as expected for a moment. But now, my migration sql scripts aren't runned anymore, even after a fresh new build (sudo docker-compose build or sudo docker-compose up --build) and after…
Ticki
  • 15
  • 3
0
votes
2 answers

Date is not being read in Dockerfile ENTRYPOINT

The problem for first time is works fine but, for next it fails to write the file with same name, So I tried adding pod_id to make it unique but seems pod id to remains same when it restarts after failing, so tried adding timestamp to the filename,…
lucky
  • 331
  • 6
  • 14
0
votes
0 answers

How can i Convert CMD to Entrypoint instruction in dockerfile

My cmd instruction in dockerfile is: CMD /etc/init.d/ssh start && su - gpadmin bash -c /home/gpadmin/entrypoint.sh && tail -f /dev/null I want to convert it to ENTRYPOINT instruction. My entrypoint script file is entrypoint.sh I want to enter the…
COBHC
  • 67
  • 1
  • 8
0
votes
1 answer

Not possible to override command with CMD or Entrypoint

I am executing the following command from the postgres doc docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres Now out of curiosity I run the following: docker run -it --name some-postgres…
Jim
  • 3,845
  • 3
  • 22
  • 47
0
votes
1 answer

docker-compose entrypoint restart not stateless

When I restart a container with docker-compose up with an entrypoint it's not stateless, it keep the context of the previous execution of the entrypoint. docker-compose file: version: '3.8' services: test: image: debian:buster-slim …
raphaelauv
  • 670
  • 1
  • 11
  • 22
0
votes
1 answer

Pass multiple arguments to ENTRYPOINT in Dockerfile

This is the entrypoint defined in my Dockerfile: ENTRYPOINT ["/bin/bash", "-c" , "useradd -r user_test -u 2001 -g 100 && chown -R 2001:100 /home/user_test && su - user_test && mkdir -p /home/user_test/external_user_id"] I need to make it…
Fab
  • 1,145
  • 7
  • 20
  • 40
0
votes
1 answer

Dockerfile Entrypoint no such file or directory: OCI not found

I have a Dockerfile with Entrypoint where I specify the config file variable and the executable file but it looks like Docker or Entrypoint doesn't recognize it. My main.py has to be executed with the config file. ENTRYPOINT…
Jane
  • 151
  • 3
  • 12
0
votes
1 answer

How can I execute a command/script after issuing "docker container stop" command?

I would like a container to run a determined command before it stops after issuing the command "docker container stop". I have found the question How to execute a script when I terminate a docker container but it does not really work as the…
Felipe
  • 17
  • 4
0
votes
1 answer

Docker Error: OCI runtime exec failed: exec failed: container_linux.go

I have created a docker image named ocp-install from the following dockerfile FROM registry.access.redhat.com/ubi8/ubi-minimal:latest ARG INSTALL_DIR=/root/install-dir ENV PATH $PATH:$INSTALL_DIR WORKDIR $INSTALL_DIR RUN…
AishwaryaK
  • 61
  • 2
  • 11
0
votes
2 answers

Supervisor as a way to run multiple entrypoints for my container

I have a need to run a script when my container starts up. (My script creates a json file from the passed in deployment environment variables for my SPA app to use as configuration.) My container is based on the Nginx container. But a Dockerfile…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
0
votes
1 answer

Openshift - Run a basic container with alpine, java and jmeter

In an Openshift environment (Kubernetes v1.18.3+47c0e71) I am trying to run a very basic container which will contain: Alpine (latest version) JDK 1.8 Jmeter 5.3 I just want it to boot and run in a container, expecting connections to run Jmeter…
ElPiter
  • 4,046
  • 9
  • 51
  • 80
0
votes
0 answers

Docker container not running (odoo with docker)

I'm trying to run odoo as SAAS service using docker .I created Odoo image successfully but when i run the image to build a container it is stopped on starting odoo stage , here is sample output of the command : $ docker container run -it…
semerouk
  • 3
  • 2
0
votes
1 answer

Why does Docker report the entrypoint file doesn't exist when ls reports it does exist?

I'm using Docker v 19. I have this at the end of my web/Dockerfile ... FROM python:3.7-slim RUN apt-get update && apt-get install RUN apt-get install -y dos2unix RUN apt-get install -y libmariadb-dev-compat libmariadb-dev RUN apt-get update \ …
Dave
  • 15,639
  • 133
  • 442
  • 830