Docker image based on ubuntu and running tini init system
1.0K
This is a Docker image based on ubuntu running tini init system inside a container.
You can build the image like this:
#!/usr/bin/env bash
docker build --no-cache \
-t "nextail/ubuntu-tini" \
--label "maintainer=Ruben Suarez <[email protected]>" \
.
You can run the container like this (change --rm with -d if you don't want the container to be removed on stop):
#!/usr/bin/env bash
prepare_docker_timezone() {
# https://www.waysquare.com/how-to-change-docker-timezone/
ENV_VARS+=" --env=TZ=$(cat /etc/timezone)"
}
prepare_docker_timezone
docker run --rm -it \
--name "ubuntu-tini" \
${ENV_VARS} \
nextail/ubuntu-tini
You can connect to the running container like this:
#!/usr/bin/env bash
docker exec -it \
ubuntu-tini \
bash -l
You can stop the running container like this:
#!/usr/bin/env bash
docker stop \
ubuntu-tini
If you run the container without --rm you can start it again like this:
#!/usr/bin/env bash
docker start \
ubuntu-tini
If you run the container without --rm you can remove once stopped like this:
#!/usr/bin/env bash
docker rm \
ubuntu-tini
Content type
Image
Digest
sha256:9c1d9fc88…
Size
28.4 MB
Last updated
almost 2 years ago
docker pull nextail/ubuntu-tini