Sign inSign up

nextail/ubuntu-tini-user

By nextail

•Updated almost 2 years ago

Docker image based on nextail/ubuntu-tini with non root user support

Image
0

739

nextail/ubuntu-tini-user repository overview

⁠ Docker image based on ubuntu 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:e7541be3a…

Size

93.4 MB

Last updated

almost 2 years ago

docker pull nextail/ubuntu-tini-user