Questions tagged [docker-entrypoint]
180 questions
115
votes
1 answer
How to run multiple commands in one Github Actions Docker
What is the right way for running multiple commands in one action?
For example:
I want to run a python script as action. Before running this script I need to install the requirements.txt.
I can think of several options:
Create a Dockerfile with the…

baruchiro
- 5,088
- 5
- 44
- 66
52
votes
4 answers
getting permission denied in docker run
I am trying using Docker using Dockerfile.
My Dockerfile as follows, where I am using debian linux system.
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
ARG AIRFLOW_VERSION=1.7.1.3
ENV AIRFLOW_HOME /usr/local/airflow
..
..
COPY…

Kush Patel
- 3,685
- 5
- 42
- 65
30
votes
4 answers
Docker entrypoint and cmd together
I try to setup a Docker with both entrypoint and cmd.
FROM debian:stretch
RUN apt-get update && \
apt install gnupg ca-certificates -y
RUN echo "deb http://repo.aptly.info/ squeeze main" > /etc/apt/sources.list.d/aptly.list
RUN apt-key adv…

Vana
- 753
- 3
- 11
- 20
21
votes
1 answer
Docker Debian nc command not found
When I build my Debian image from docker-compose, with the command $ docker-compose -f docker-compose-dev.yml build web, like so:
docker-compose-fev.yml
services:
web:
build:
context: ./services/web
dockerfile: Dockerfile-dev
…

8-Bit Borges
- 9,643
- 29
- 101
- 198
19
votes
3 answers
entrypoint: "entrypoint.sh" - docker compose
There is no such file by name entrypoint.sh in my workspace.
But below instruction in docker-compose.yml is referring it:
builder:
build: ../../
dockerfile: docker/dev/Dockerfile
volumes:
- ../../target:/wheelhouse
volumes_from:
-…

overexchange
- 15,768
- 30
- 152
- 347
18
votes
3 answers
Add shell or bash to a docker image (Distroless based on Debian GNU/Linux)
I want add shell or bash to my image to execute installation command.
I have copied the /bin/bash on my VM on to my image on Dockerfile:
COPY /bin/bash /bin/
But when I execute the docker command:
docker run -it --entrypoint "/bin/bash"…

egrey
- 189
- 1
- 1
- 6
17
votes
6 answers
How to pass Java options/variables to Springboot app in docker run command
I have a Spring Boot application which uses profiles to configure in different environments. I want to pass this profile information as a parameter to my docker run command. How do I go about doing it?
Here is my dockerfile
FROM…

TechiRik
- 1,893
- 6
- 27
- 37
13
votes
3 answers
Pass ARG to ENTRYPOINT
Say I have this in a Dockerfile:
ARG FOO=1
ENTRYPOINT ["docker.r2g", "run"]
where I build the above with:
docker build -t "$tag" --build-arg FOO="$(date +%s)" .
is there a way to do something like:
ENTRYPOINT ["docker.r2g", "run", ARG FOO] //…

Alexander Mills
- 90,741
- 139
- 482
- 817
11
votes
1 answer
docker-compose, how to run bash commands after container has started, without overriding the CMD or ENTRYPOINT in the image docker is pulling in?
I just want to rename a few files, without overriding the commands inside the wordpress image that the docker is pulling in.
Inside the docker-compose.yml I tried using 'command' and 'entrypoint' to run bash commands, both basically interrupt what's…

Mladen
- 516
- 1
- 9
- 20
11
votes
3 answers
Docker entrypoint permission denied
I am currently trying to deal with a deployment to a kubernetes cluster. The deployment keeps failing with the response
Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec:…

tacoofdoomk
- 121
- 1
- 1
- 7
11
votes
2 answers
Running a custom script using entrypoint in docker-compose
I modified the docker-compose.yml file as given on https://hub.docker.com/_/solr/ by adding a volumes configuration and a change in entrypoint. The modified file is as given:
version: '3'
services:
solr:
image: solr
ports:
-…

Ayushya
- 9,599
- 6
- 41
- 57
8
votes
2 answers
docker run without entry point
Could we have a {docker run} command without a entry point?
As far as I can see, there must be an entry point (if not specified, it should be defaulted to "bash" at most cases). Otherwise, I cannot have an image running as an container.
Let say I…

kzfid
- 688
- 3
- 10
- 17
8
votes
0 answers
View docker entrypoint output
I'm configuring an entrypoint to be executed after the container is started:
COPY entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT exec /entrypoint.sh
However, I'm not able to see the output of entrypoint.sh execution…

Manolo
- 24,020
- 20
- 85
- 130
8
votes
1 answer
Docker: Entrypoint's override involve CMD specification?
That's a question for my pure curiousity:
I have to personalize a Docker Image, in particular this is an extract of my dockerfile:
ARG DEFAULT_PHP_VERSION
FROM php:${DEFAULT_PHP_VERSION:+${DEFAULT_PHP_VERSION}-}fpm-alpine
# RUN some personal…

Sim Sca
- 413
- 7
- 18
8
votes
1 answer
How do I specify a PowerShell script as a Docker container entry point?
I need to run a [Windows] Docker container as an executable, running a rather involved PowerShell script (invoking Java and .NET applications) and exiting. Docker documentation suggests using ENTRYPOINT for this purpose. So I went ahead and created…

Web User
- 7,438
- 14
- 64
- 92