Sign inSign up

slocomptech/baseimage

By slocomptech

Updated almost 7 years ago

Baseimages with s6 overlay supervisor framework installed

Image
0

375

slocomptech/baseimage repository overview

Base image

This is base image with s6 overlay (supervisor utils) already setup. Directory structure is also setup.

Project structure

root # Files copied to image started from root
Dockerfile # Image configuration

Directories

Image has prepared directories:

  • /app for application
  • /config for configuration
  • /data for application data
  • /defaults for default configuration which is copied to /config if directory is empty
  • /log for logging (often you need separated directory for logs (because you don't want to write to eg. SD card ...))

Parameters

ParameterFunction
-e CONTAINER_USER="abc"Set non-root user used in container (do not modify, already set in Dockerfile)
-e NO_CHOWN=trueDisable fixing permissions for files (implement in derived images.)
-e NO_DEFAULT_CONFIG=trueSkip setting up default config
-e PUID=1000for UserID - see below for explanation
-e PGID=1000for GroupID - see below for explanation
-e TZ=Europe/LondonSpecify a timezone
-v /configAll the config files reside here.
-v /logAll the log files reside here.

Environment variables

Variable nameFunction
CONTAINER_USERUser used to run in less priviledged mode (owner of prepared directories).
IMAGE_STACKTop base image eg. alpine, nginx, node ...

User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

$ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Note: Default user is in most cases named abc.

Building locally

# Build image
sudo docker build -t IMGNAME .

# Run image
sudo docker run --rm -it IMGNAME bash

Issues

Submit issue here.

Versioning

This project uses semver schema.

Documentation

Versions

  • 1.0.0 - First version

Tag summary

Content type

Image

Digest

Size

29.7 MB

Last updated

almost 7 years ago

docker pull slocomptech/baseimage:node