commit 2319f07f3770d1a123bfd282ea18e9e2f28841b0 Author: sparklyballs Date: Wed Jun 29 14:05:57 2016 +0100 first commit diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..071b62f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +FROM gliderlabs/alpine:3.4 +MAINTAINER sparklyballs + +# set version for s6 overlay +ARG OVERLAY_VERSION="v1.18.1.0" + +# set some environment variables +ENV PS1="$(whoami)@$(hostname):$(pwd)$ " \ +HOME="/root" \ +TERM="xterm" + +# add packages +RUN \ + apk add --no-cache --virtual=build-dependencies \ + curl \ + tar && \ + + apk add --no-cache \ + bash \ + s6 \ + s6-portable-utils \ + tzdata && \ + +apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/testing \ + shadow && \ + +# add s6 overlay + curl -o \ + /tmp/s6-overlay.tar.gz -L \ + https://github.com/just-containers/s6-overlay/releases/download/"${OVERLAY_VERSION}"/s6-overlay-nobin.tar.gz && \ + tar xvfz /tmp/s6-overlay.tar.gz -C / && \ + +# clean up + apk del --purge \ + build-dependencies && \ + rm -rf /var/cache/apk/* /tmp/* + +# create abc user +RUN \ + groupmod -g 1000 users && \ + useradd -u 911 -U -d /config -s /bin/false abc && \ + usermod -G users abc && \ + +# create some folders + mkdir -p /config /app /defaults + +# add local files +COPY root/ / + +ENTRYPOINT ["/init"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b6f2b5 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +![https://linuxserver.io](https://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) + +### This base container is not aimed at public consumption. It exists to serve as a single endpoint for LinuxServer.io containers and is based upon [Alpine Linux](https://hub.docker.com/_/alpine/) and [S6 overlay](https://github.com/just-containers/s6-overlay). + +If you want to comment\contribute to our work, feel free to join us at out irc channel: +[IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io` or visit our website at [https://linuxserver.io](https://linuxserver.io). diff --git a/root/etc/cont-init.d/10-adduser b/root/etc/cont-init.d/10-adduser new file mode 100644 index 0000000..3b65fff --- /dev/null +++ b/root/etc/cont-init.d/10-adduser @@ -0,0 +1,31 @@ +#!/usr/bin/with-contenv bash + + +PUID=${PUID:-911} +PGID=${PGID:-911} + +if [ ! "$(id -u abc)" -eq "$PUID" ]; then usermod -o -u "$PUID" abc ; fi +if [ ! "$(id -g abc)" -eq "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi + +echo " +------------------------------------- + _ _ _ + | |___| (_) ___ + | / __| | |/ _ \ + | \__ \ | | (_) | + |_|___/ |_|\___/ + |_| + +Brought to you by linuxserver.io +We do accept donations at: +https://www.linuxserver.io/donations +------------------------------------- +GID/UID +------------------------------------- +User uid: $(id -u abc) +User gid: $(id -g abc) +------------------------------------- +" +chown abc:abc /app +chown abc:abc /config +chown abc:abc /defaults