Questions tagged [docker-entrypoint]

180 questions
1
vote
0 answers

How to get entrypoint defined in docker image to wrap it in helm installation

I use helm3 to deploy into k8s. Sometimes I need to "wrap" docker entry point for various reasons. One of them is to fill right environment (envs). Usually I do it like this: deployment.yaml ... image: "{{ .Values.image.repository }}" …
Korjavin Ivan
  • 439
  • 1
  • 5
  • 15
1
vote
1 answer

Exported environmental variable via docker entrypoint are not shown when logging into the container

Assume a simple Dockerfile FROM php-fpm:8 ADD entrypoint.sh . RUN chmod +x entrypoint.sh ENTRYPOINT ["./entrypoint.sh"] CMD ["php-fpm"] In the entry-point script I just export a variable and print the environment #!/bin/bash set -e export…
ira
  • 5,569
  • 6
  • 30
  • 41
1
vote
2 answers

Prevent Docker container to exit

I'm start to dockerize a Linux Application and to do that I wrote a Dockerfile that: Extract the application TAR file into a directory. Execute the "entrypoint.sh" the "entrypoint.sh": Check if the application is already installed. If the…
Federico
  • 1,117
  • 6
  • 20
  • 37
1
vote
0 answers

How to deploy an application to cloud run in google cloud?

I created a docker image by Dockerfile FROM golang:1.15-buster as builder WORKDIR /app COPY . . COPY ../../../common/library/golang /app RUN go build -o server FROM debian:buster-slim RUN set -x &&…
1
vote
1 answer

docker-compose entrypoint with mutiple commands

How to run docker-compose entrypoint configuration option with multiple bash commands commands: yarn install yarn build sleep infinity
Harsha G V
  • 586
  • 1
  • 6
  • 21
1
vote
0 answers

docker-entrypoint-initdb.d not executing scripts

I'm using docker-compose version 1.25.5, build 8a1c60f6 & Docker version 19.03.8, build afacb8b I'm trying to initialise database with Users in MongoDb container using docker-entrypoint-initdb.d but, js/scripts aren't being executed when container…
Tony
  • 436
  • 1
  • 9
  • 17
1
vote
0 answers

Docker entrypoint to run commands with different users in interactive mode

I have a custom image with docker installed (docker-in-docker). When running the image, the user needs to be $USERNAME (and not root). However the docker service required root to be started. Getting docker to run as non-root seems to be overly…
d_inevitable
  • 4,381
  • 2
  • 29
  • 48
1
vote
2 answers

Docker - using labels to influence the start-up sequence

My Django application uses Celery to process tasks on a regular basis. Sadly this results in having 3 continers (App, Celery Worker, Celery Beat) each of them having a very own startup shell-script instead of a docker entrypoint script. So my Idea…
user11684966
1
vote
1 answer

Dockerfile execute additional scripts in entrypoint

I'm building a lamp container for development work from glats/alpine-lamp. I want to run some additional sql commands (create a DB and some test users) after the container loads. I've created a new init.sh script that I'm running as my Dockerfile's…
user101289
  • 9,888
  • 15
  • 81
  • 148
1
vote
2 answers

How to access build args in ENTRYPOINT dockerfile

I am trying to deploy an app in payara micro based on payara dockerimage and I need to pass one arguement snapshotversion in ENTRYPOINT(basically i want to access the build args in ENTRYFORM) exec form, as exec form of ENTRYPOINT is preferred: my…
MiGo
  • 551
  • 2
  • 7
  • 17
1
vote
1 answer

Docker image fails to run process in foreground mode

I'm developing a docker image based on nvidia/cuda:10.1-base-ubuntu18.04. At build time a custom web server is installed and I have a docker-entrypoint.sh which runs the server depending if an env var is set at run time. This all works fine if I…
Geordie
  • 1,920
  • 2
  • 24
  • 34
1
vote
1 answer

Accessing sensitive user credentials in entrypoint.sh of docker

Trying to create a few Airflow connections and executing the command in entrypoint.sh file which is passed as entrypoint file in the dockerfile. As these database credentials are very sensitive, is it possible that we store them securely in…
1
vote
0 answers

Entrypoint at portainer.io is not working like in Docker image

I have a docker Image with the following Entrypoint. ENTRYPOINT [ "sh", "-c", "/var/www/html/app/Console/cake schema update -y && /var/www/html/app/Console/cake migration && apache2-foreground"] Now I want to use portainer.io to manage docker…
DS87
  • 536
  • 3
  • 9
  • 29
1
vote
2 answers

How to run `args` as `command` in kubernetes

I have a python script I want to run in a kubernetes job. I have used a configMap to upload it to the container located for example in dir/script.py. The container is run normally with the args["load"]. I have tried using a postStart lifecycle in…
Shammir
  • 927
  • 4
  • 17
  • 32
1
vote
2 answers

Unable to get any Docker Entrypoint from script working without continuous restarts

I'm having trouble understanding or seeing some working version of using a bash script as an Entrypoint for a Docker container. I've been trying numerous things for about 5 hours now. Even from this official Docker blog, using a bash-script as an…
Alexander Kleinhans
  • 5,950
  • 10
  • 55
  • 111