Giter VIP home page Giter VIP logo

docker-baseimage's Introduction

Docker Alpine base image with S6 overlay for X86 and ARM

Build Status

Based on Alpine with the S6 overlay to be able to run processes with custom UID (user id) and GID (group id). This prevents all kinds of problems with external mountpoints and incorrect user permissions.

This setup is inspired by the fine work done by linuxserver.io and hypriot

Quick setup

This image should be used as the base image for new custom images. See https://github.com/just-containers/s6-overlay for more information about the S6 overlay system.

Build image locally

For X86 based images use the following:

docker build -f ./x86/Dockerfile -t baseimage .

For ARM (e.g. Raspberry Pi) based images use the following:

docker build -f ./arm/Dockerfile -t rpi-baseimage .

Use as base image

For X86 based images use the following:

FROM erikdevries/baseimage:latest

For ARM (e.g. Raspberry Pi) based images use the following:

FROM erikdevries/rpi-baseimage:latest

With this base image you get a system that includes Alpine Linux with S6 overlay installed. A single script is installed with this base image, namely to create a custom user (abc with UID = 1000) and group (abc with GID = 1000).

Provide the following environment variables when starting a container to modify the user id and/or group id:

  • PUID to modify the UID (1000 by default)
  • PGID to modify the GID (1000 by default)

To find out the UID and GID for the user running Docker, run the following command;

  $ id <dockeruser>
    uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.