Questions tagged [docker-entrypoint]

180 questions
7
votes
2 answers

Dockerfile entrypoint unable to switch user

I am unable to switch user to a non-root user from the entry point script. The User directive to change the user in Dockerfile works, but I am not able to change permissions using chmod. To overcome this issue I created entrypoint.sh script to…
7
votes
3 answers

Docker entrypoint not found although in PATH (and executable)

I am creating a simple image with the following Dockerfile FROM docker:latest COPY docker-entrypoint.sh /usr/local/bin ENTRYPOINT ['docker-entrypoint.sh'] Inside my container: / # ls -al $(which docker-entrypoint.sh) -rwxrwxr-- 1 root root…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
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
4
votes
1 answer

How to execute bash expression in Docker ENTRYPOINT?

There's a Docker file for SpringBoot application with this entry point: # some lines omitted ENTRYPOINT java -jar app.jar --spring.config.additional-location=$(ls /config/*.properties | tr '\n' ',') On container start a host directory is mounted…
diziaq
  • 6,881
  • 16
  • 54
  • 96
4
votes
0 answers

Heroku with container stack and ENTRYPOINT instruction continues to run with "/bin/sh -c"

I'll first preface with relevant sections in Heroku's documentation on their container registry and runtime for Docker deploys. The Docker commands and runtime section states: ENTRYPOINT is optional. If not set, /bin/sh -c will be used CMD…
James
  • 4,599
  • 2
  • 19
  • 27
4
votes
2 answers

Exec not replacing bash shell in Docker entrypoint script

I'm trying to run a UWSGI server from a Docker container. I've had success, but I'm hitting a wrinkle in that my entrypoint script will still be running as root with PID 1 after container startup, when I'd rather have the initial /bin/bash process…
Aaron Bley
  • 43
  • 3
4
votes
1 answer

Docker Standard_init_linux.go:207: exec user process caused “no such file or directory”

My Dockerfile looks like: FROM ubuntu:18.04 RUN apt-get ... ... COPY app /bin And my executable app is just bash script: make -f /app/makefile $@ When I try to run docker run -v "`pwd`:/project" -it --rm my_image app I get the following…
Nick Roz
  • 3,918
  • 2
  • 36
  • 57
4
votes
1 answer

How do I pass a local file as an argument with docker run?

I have a Dockerfile like this: FROM python:3.6 RUN mkdir /code COPY dist/python-0.1.0.tar.gz /code WORKDIR /code RUN pip install python-0.1.0.tar.gz ENTRYPOINT ["post"] The "post" command runs my code fine with no arguments. My question is how can…
Sarah
  • 669
  • 2
  • 8
  • 21
3
votes
1 answer

Docker deploy in Heroku error - Permission denied

I want to deploy a web page in Heroku using Docker. I have two entrypoints ENTRYPOINT ["/app/entrypoint.sh"] ENTRYPOINT ["/app/yt_bot.py"] The first entrypoint works perfectly But when it reaches the second entrypoint, it throws an error:…
Antonio Sanchez
  • 381
  • 1
  • 3
  • 11
3
votes
1 answer

Exporting a environment variable in Entrypoint file not work?

I have some problems with exporting an environment variable into docker Entrypoint file. This is my docker file content: FROM ubuntu:16.04 ADD entrypoint.sh . RUN chmod 777 entrypoint.sh ENTRYPOINT ["./entrypoint.sh"] CMD…
3
votes
1 answer

Docker - WORKDIR issue on alpine image (Multi-Stages build)

I have this second stage for my Dockerfile: ############################################ MULTI STAGE BUILD PART 2 ############################################## # Start from alpine image FROM alpine # Creating work directory WORKDIR /service #…
Emixam23
  • 3,854
  • 8
  • 50
  • 107
3
votes
5 answers

How do I prevent my script from being run every time a Docker container is brought up?

I would to run a script (populate my MySql Docker container) only when my docker containers are built. I'm running the following docker-compose.yml file, which contains a Django container. version: '3' services: mysql: restart: always …
Dave
  • 15,639
  • 133
  • 442
  • 830
3
votes
2 answers

Dockerfile with entrypoint only from base image

I have a very simple Dockerfile like the below :- FROM my-base-image COPY abc.properties /opt/conf/ Now my base-image has a docker entrypoint (at the end of its Dockerfile) but this resulting image as you can see has none. Does this work or do…
Ashley
  • 1,447
  • 3
  • 26
  • 52
3
votes
2 answers

How to override/discover CMD/ENTRYPOINT for base image

Say I have this: FROM oresoftware/lmx-broker:0.2.1 ENTRYPOINT ['/docker-entrypoint.sh'] if I don't use CMD will CMD default to the value set in the base image? Will my use of ENTRYPOINT override the ENTRYPOINT in the base image? Will my use of CMD…
user11810894
3
votes
1 answer

Procfile Error Deploying Rails API with Dokku

I am currently trying to deploy my Rails API on Dokku, I keep running into this error where it says "Proc entrypoint [procname] does not exist. Please check your Procfile". I'm not sure what the issue is and how to set up an entrypoint, I've tried…
AngeloS
  • 186
  • 1
  • 3
  • 17
1
2
3
11 12