Sign inSign up

nextail/ubuntu-tini

By nextail

Updated almost 2 years ago

Docker image based on ubuntu and running tini init system

Image
0

1.0K

nextail/ubuntu-tini repository overview

Docker image based on ubuntu 20.04 and running tini init system

This is a Docker image based on ubuntu running tini init system inside a container.

Building

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]>" \
	.

Running

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

Connect

You can connect to the running container like this:

#!/usr/bin/env bash

docker exec -it \
  ubuntu-tini \
  bash -l

Stop

You can stop the running container like this:

#!/usr/bin/env bash

docker stop \
  ubuntu-tini

Start

If you run the container without --rm you can start it again like this:

#!/usr/bin/env bash

docker start \
  ubuntu-tini

Remove

If you run the container without --rm you can remove once stopped like this:

#!/usr/bin/env bash

docker rm \
  ubuntu-tini

Tag summary

Content type

Image

Digest

sha256:9c1d9fc88

Size

28.4 MB

Last updated

almost 2 years ago

docker pull nextail/ubuntu-tini