Questions tagged [docker-entrypoint]
180 questions
0
votes
1 answer
why one linux command is working inside conatiner but not in entrpoint.sh
I am using ubuntu 16.04 OS as VM.
While creating container, i have some commands in entrpoint.sh which is not working or behaving as expected but the same command is working when i am manually running inside the container, to be precise below is my…

Diwakar Bhatt
- 495
- 2
- 11
- 24
0
votes
0 answers
How to load a large table in a mysql docker container without blocking the database?
I use the default mysql docker container. I have a 500Mb (compressed sql.gz file) table backup which takes a long time to load. My current option is to load this large table in the background after the container is started.
I have tried to place…

Paul Rougieux
- 10,289
- 4
- 68
- 110
0
votes
1 answer
Symfony pass -env parameter when I run composer commands
When I create a docker entrypoint script for my project I run:
php /bin/composer install --no-dev
But thhat throws an exception that is:
Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class…

Dimitrios Desyllas
- 9,082
- 15
- 74
- 164
0
votes
1 answer
Reach host's folders from docker container
I have a folder in host machine's this directory /files/username/. username is variable.
And this is my Dockerfile's CMD directive:
CMD ./entrypoint.sh
I want to get contents of /files/username/ folder in entrypoint.sh. And I can get username…

Eray
- 7,038
- 16
- 70
- 120
0
votes
1 answer
Dockerfile doesn't run the CMD if the ENTRYPOINT isn't finished
I am trying to run a Dockerfile that run PostgreSQL and then add some tables to it.
This is my Dockerfile:
FROM postgres:9.6
MAINTAINER agomez@ikerlan.es
USER postgres
ADD ./backup.sql /backup.sql
ADD ./deploy/import_database.sh…

Asier Gomez
- 6,034
- 18
- 52
- 105
0
votes
1 answer
Change ENTRYPOINT to container after building
I have a Dockerfile, which ends with:
ENTRYPOINT ["/bin/bash", "/usr/local/cdt-tests/run-tests.sh"]
After building this container, I want to run it, but instead of executing this bash script (run-tests.sh), I want to open up a terminal window…

Alexander Mills
- 90,741
- 139
- 482
- 817
-1
votes
1 answer
Dockerfile: ENTRYPOINT doesn't expand ARG/ENV variable
I'm using CentOS.7 in a container (because I have to) and need to install some RedHat Software Collection packages to up-version a couple of tools. This involves running source scl_source enable to set up the environment, which I'm doing…

kbro
- 4,754
- 7
- 29
- 40
-1
votes
1 answer
How does entrypoint.sh file run in a Docker?
I'm working with a debian base image that comes with an entrypoint.sh file stored in /bin by default.
If I don't define ENTRYPOINT in a Dockerfile, and I do a docker run, I see that entrypoint.sh runs automatically executing a bunch of commands.
If…

Dante
- 537
- 2
- 4
- 18
-1
votes
1 answer
create a symlink in an unprivileged container error
I'm running K8s deployment and trying to harden the security of one of my pod and because of that I started using the following docker image:
nginxinc/nginx-unprivileged:alpine
The problem is that I need to create a symlink and cannot get it…

Danilo Patrucco
- 110
- 3
- 10
-1
votes
2 answers
Running bash script in a dockerfile
I am trying to run multiple js files in a bash script like this. This doesn't work. The container comes up but doesn't run the script. However when I ssh to the container and run this script, the script runs fine and the node service comes up. Can…

user6904665
- 15
- 1
- 5
-1
votes
1 answer
Docker run does not find ENTRYPOINT
I have the following Dockerfile:
FROM ubuntu:19.10
WORKDIR /gen
COPY script.sh ./
RUN chmod +x script.sh && export PATH="/gen/:$PATH"
ENTRYPOINT [ "script.sh" ]
It builds fine, but I cannot execute it. The solution from post is to add the full…

User12547645
- 6,955
- 3
- 38
- 69
-1
votes
3 answers
How to copy a file from the host into a container while starting?
I am trying to build a docker image using the dockerfile, my purpose is to copy a file into a specific folder when i run the "docker run" command!
this my dockerfile code:
FROM openjdk:7
MAINTAINER MyPerson
WORKDIR /usr/src/myapp
…

user1444393
- 213
- 1
- 4
- 17
-2
votes
1 answer
Docker -it option won't work with ENTRYPOINT or CMD in Dockerfile
I'm new to Docker, when I run my docker image with -it option, docker container finishes running, echoed "test" as indicated in my docker file and exited with zero. The expected behavior should be that docker keeps open a virtual terminal of the…

Jason
- 1