Questions tagged [docker-entrypoint]

180 questions
0
votes
1 answer

How to dynamically set environment variables in a docker-entrypoint.sh?

I have a go binary that will pull environment variables from AWS SSM Param, when the script runs, it prints out lines like this: export FOO="BAR" export BAZ="QUX" This works well and I actually see the print happening. Then, I have a…
PGT
  • 1,468
  • 20
  • 34
0
votes
1 answer

Make docker exit on any command failure in docker-entrypoint.sh

I'm trying to load AWS SSM Parameters in my docker-entrypoint.sh I'm testing the failure case and it continues to the CMD if it fails. #!/bin/bash set -eo pipefail ssm_available() { if [ -z ${SSM_BASE_PATH+x} ]; then return 1 fi return…
PGT
  • 1,468
  • 20
  • 34
0
votes
0 answers

Integrity check Dockerfile entrypoint layer

I'm wondering if there is a way I can perform an integrity check of a containers entrypoint. The images are used in micro-services and easily modified by the teams running them. Considering each layer packaged as a tar.gz with a SHA256 sum, is there…
Bonn93
  • 163
  • 1
  • 1
  • 6
0
votes
0 answers

Python app passing config file trhough Docker

I created a stand-alone application with Python3 that accepts a file as input, however I am not able to let it work properly. Once installed on my system I run the application as myapp -accounts ./accounts.yaml. Now, I am trying to replicate this…
net_programmer
  • 360
  • 1
  • 2
  • 11
0
votes
1 answer

How can I troubleshoot 'required file not found' error when running Postgres docker-compose with initialization scripts?

I'm tryng to use a docker-compose file to mount a posgres container and run two scripts after that. i"m using 'docker-entrypoint-initdb.d' for that. Here is my docker-compose file: version: '3.4' services: postgres-compose: image:…
0
votes
1 answer

Docker - Python Django error entrypoint.sh: no such file or directory

I follow a tutorial about DRF backend and Docker use for test api. Link tutorial: https://www.youtube.com/watch?v=tujhGdn1EMI They were fully setup docker-compose and dockerfile. I am following but got error "exec…
0
votes
0 answers

podman ENTRYPOINT/CMD behaviour issues on Azure

I am using podman to run a model on Azure. I need to run the model many times so i am sending these jobs to additional nodes that are managed by SLURM. The podman command i use is: podman run --rm --mount "type=bind,src=/inputfiles/,dst=/app/model"…
andy
  • 185
  • 9
0
votes
0 answers

I can't launch my docker image via my container (env: can't execute 'python3) (exec /opt/entrypoint.sh: no such file or directory)

I can't run my docker image in my container in Docker-Desktop on Windows: docker image - container Here is my file entrypoint.sh : #!/bin/sh echo $0 set -e # Global variables PYTHONPATH="${PYTHONPATH}:/app/src" PYTHON_BIN=$(which…
Kevin JM
  • 1
  • 1
0
votes
0 answers

Docker entrypoint is missing in containerConfig even though specified in Dockerfile

Here is my Dockerfile FROM openjdk:11 as build WORKDIR /opt COPY build/libs/migrator-*.jar /opt/migrator.jar EXPOSE 8080 ENTRYPOINT ["java", "-Xms512m", "-Xmx1024m", "-jar", "migrator.jar"] when I build it locally, it works fine, but when I build…
gowtham
  • 977
  • 7
  • 15
0
votes
1 answer

Getting blank output while CMD & ENTRYPOINT instructions together

My dockerfile looks as below: FROM ubuntu ENTRYPOINT echo CMD ["helloworld"] The container built from the above dockerfile image is giving a blank output. [root@dockerhost dproj]# docker run -it --name con1 demo [root@dockerhost dproj]# Expected…
meallhour
  • 13,921
  • 21
  • 60
  • 117
0
votes
2 answers

Docker is adding single quotes to ENTERYPOINT argument

I am creating a Dockerfile that needs to source a script before a shell is run. ENTRYPOINT ["/bin/bash", "-rcfile","<(echo '. ./mydir/scripttosource.sh')"] However, the script isn't sourced as expected. Combining these parameters on a command line…
0
votes
0 answers

/bin/bash: 1: ./entrypoint.sh: not found

In Debian GNU/Linux 11 (bullseye) based Dockerfile, I tried to use CMD to run an entry point command: #EDIT WORKDIR "/tmp" USER root COPY ./entrypoint.sh /tmp/rails/entrypoint.sh RUN chmod +x /tmp/rails/entrypoint.sh EXPOSE 80 CMD…
simo
  • 23,342
  • 38
  • 121
  • 218
0
votes
0 answers

java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication. [Maven class not found]

I have created a Dockerfile and has passed a entrypoint.sh into it which is responsible for running the java command. Build of the dockerfile is happening successfully but when I run it, it shows the below error. Exception in thread "main"…
0
votes
0 answers

Scale service with multiple ports and pass these ports to another service

I'm trying to run a system with a controller and multiple workers. While doing a udp-Healthcheck the controller acts as a UDP client and the worker act as a server. The ports where the controller/client should send the udp request to, is passed…
0
votes
0 answers

How to update collection in init.js using Mongo script?

I have the following collection users { "_id" : ObjectId("..."), "username" : "admin", "permissions" : { "keycloakId" : "...", "roles" : [ "admin" ] }, } I need to update roles field. I want to…