Sign inSign up

githubtommie/container-setuputils

By githubtommie

•Updated over 6 years ago

A small collection of utilities to initialize (Docker) containers.

Image
0

221

githubtommie/container-setuputils repository overview

⁠Container Setup Utilities

Build Status

This is a small collection of utilities to initialize (Docker) containers.

These have been tested with

⁠Commands

⁠addusergroup

A simplified way of creating users in Dockerfiles.

# The user to run the exporter as. Created if it's not root.
ARG RUN_USER=root
# Use this UID for the non-root user. Optional.
ARG RUN_UID=
# Use this GID for the non-root group. Optional.
ARG RUN_GID=
# A comma-separated list of supplemental groups with optional GID,
# e.g. "onewithuid:1234,anotherexisting".
ARG RUN_SUPP_GROUPS=

COPY --from=githubtommie/container-setuptils addusergroup /sbin/addusergroup
RUN [ "$RUN_USER" = root ] || addusergroup -u "$RUN_UID" -g "$RUN_GID" -G "$RUN_SUPP_GROUPS" "$RUN_USER"
USER $RUN_USER

⁠Running tests

Running the tests on your local system: make check

Running the tests in Docker for all supported base images: make check-docker

Tag summary

Content type

Image

Digest

Size

805 Bytes

Last updated

over 6 years ago

docker pull githubtommie/container-setuputils