Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 508 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 508 Bytes

medium-docker-keep-running

Build

docker build -t keeprun .

Run

## Run normal
docker run -d --name myc keeprun

## Run with keep running
docker run -d --name myc keeprun tail -f /dev/null

### Alternatively inside Dockerfile
# ENTRYPOINT ["tail", "-f", "/dev/null"]

SSH into container

docker exec -it myc /bin/sh

Check logs

docker logs myc

Remove container

## Use "--force" so it don't has to be stopped before
docker rm myc --force