If you are using a Dockerfile, try:
ENTRYPOINT ["tail", "-f", "/dev/null"]
(Obviously this is for dev purposes only, you shouldn’t need to keep a container alive unless it’s running a process eg. nginx…)
More Related Contents:
- Docker container will automatically stop after “docker run -d”
- What is the difference between a Docker image and a container?
- Docker: Copying files from Docker container to host
- How to access host port from docker container [duplicate]
- How to copy files from host to Docker container?
- Where are Docker images stored on the host machine?
- How to remove old and unused Docker images
- How to deal with persistent storage (e.g. databases) in Docker
- How do I get into a Docker container’s shell?
- My docker container has no internet
- How to assign more memory to docker container
- docker run
- Is there a way to combine Docker images into 1 container?
- Is it possible to start a stopped container from another container
- Can’t delete docker image with dependent child images
- How to execute command from one docker container to another
- What is the difference between import and load in Docker?
- Error “Get https://registry-1.docker.io/v2/: net/http: request canceled” while building image
- Finding the layers and layer sizes for each Docker image
- Copying files from Docker container to host
- Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
- Docker: How to clear the logs properly for a Docker container?
- How to pass arguments within docker-compose?
- Docker mount to folder overriding content
- How can I delete Docker’s images?
- How do I set environment variables during the build in docker
- Using docker-compose with CI – how to deal with exit codes and daemonized linked containers?
- How to get Docker containers to talk to each other while running on my local host?
- Kafka access inside and outside docker [duplicate]
- Change directory command in Docker?