Just try:
ENTRYPOINT service ssh restart && bash
in your dockerfile, it works fun for me!
more details here: How to automatically start a service when running a docker container?
More Related Contents:
- Docker Compose wait for container X before starting Y
- What is the difference between docker-compose ports vs expose
- Confused about Docker -t option to Allocate a pseudo-TTY
- How to mount a single file in a volume
- How to set the locale inside a Debian/Ubuntu Docker container?
- Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
- Exposing a port on a live Docker container
- How to update /etc/hosts file in Docker image during “docker build”
- Docker cannot start on Windows
- Conditional COPY/ADD in Dockerfile?
- docker: “build” requires 1 argument. See ‘docker build –help’
- Docker build “Could not resolve ‘archive.ubuntu.com'” apt-get fails to install anything
- What is a dangling image and what is an unused image?
- What is the right way to add data to an existing named volume in Docker?
- How can I use a variable inside a Dockerfile CMD?
- How to Dockerize windows application
- How to automatically start a service when running a docker container?
- How do I edit a file after I shell to a Docker container?
- Docker: Using –password via the CLI is insecure. Use –password-stdin
- How does Docker Swarm implement volume sharing?
- Share variable in multi-stage Dockerfile: ARG before FROM not substituted
- Docker follow symlink outside context
- Docker mounted volume adds ;C to end of windows path when translating from linux style path
- When to use –hostname in docker?
- Docker add network drive as volume on windows
- Substitute environment variables in NGINX config from docker-compose
- Build a single image based on docker compose containers
- Issue in executing puppeteer in headful mode in Docker
- Root password inside a Docker container
- How to access the VM created by docker’s HyperKit?