diff --git a/template/Dockerfile b/template/Dockerfile index e7e652a..bc68a68 100644 --- a/template/Dockerfile +++ b/template/Dockerfile @@ -1,34 +1,24 @@ -FROM linuxserver/baseimage +FROM lsiobase/alpine MAINTAINER Your Name -ARG DEBIAN_FRONTEND="noninteractive" -ENV APTLIST="packages to install and update via apt" +# install packages +RUN \ -#Applying stuff -RUN apt-get update -q && \ -apt-get install $APTLIST -qy && \ -##DO STUFF HERE +##DO STUFF HERE ## END EACH LINE WITH && \ ## EXCEPT THE LINE BELOW -apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* -#Adding Custom files -COPY init/ /etc/my_init.d/ -COPY services/ /etc/service/ -COPY cron/ /etc/cron.d/ -COPY defaults/ /defaults/ -RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh +# copy local files +COPY root/ / -# Volumes and Ports -VOLUME /volume +# ports and volumes EXPOSE PORT +VOLUME /volume ## NOTES ## -## Delete files\folders not needed, e.g. if you dont run any cron commands, delete the cron folder and the "ADD cron/ /etc/cron.d/" line. -## The User abc, should be running everything, give that permission in any case you need it. -## Use linuxserver/baseimage as often as posible (or linuxserver/baseimage.nginx/apache/python where applicable) -## When creating init's Use 10's where posible, its to allow add stuff in between when needed. also, do not be afraid to split custom code into several little ones. -## Make stuff as quiet as posible "e.g. apt-get update -qq" (Does not apply to the "app" itself. e.g. plex) +## Delete files\folders not needed +## The User abc, should be running everything, give that permission in any case you need it. +## When creating init's Use 10's where posible, its to allow add stuff in between when needed. also, do not be afraid to split custom code into several little ones. ## user abc and folders /app /config /defaults are all created by baseimage -## the first available init script is 30.sh +## the first available init script is 30 diff --git a/template/README.md b/template/README.md index 4dc0c18..3c3b631 100644 --- a/template/README.md +++ b/template/README.md @@ -1,5 +1,10 @@ -![https://linuxserver.io](http://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) +![https://linuxserver.io](https://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) + +## This is a Container in active development by the [LinuxServer.io](https://linuxserver.io) team and is not recommended for use by the general public. + +If you want to comment\contribute on this container , are looking for support on any of our other work , or are curious about us in general, check out the following. + +* [forum.linuxserver.io](https://forum.linuxserver.io) +* [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io` +* [Podcast](https://www.linuxserver.io/index.php/category/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation! -## This is a Container in active development, and should not be used by the general public. -If you are curious about the current progress or want to comment\contribute to this work, feel free to join us at our irc channel: -[IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io` or visit our website at [https://linuxserver.io](https://www.linuxserver.io/). diff --git a/template/READMETEMPLATE.md b/template/READMETEMPLATE.md index a22e04a..2da5c9c 100644 --- a/template/READMETEMPLATE.md +++ b/template/READMETEMPLATE.md @@ -9,7 +9,7 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container r Provide a short, concise description of the application. No more than two SHORT paragraphs. Link to sources where possible and include an image illustrating your point if necessary. Point users to the original applications website, as that's the best place to get support - not here. -Our Plex container has immaculate docs so follow that if in doubt for layout. +Our Plex container has immaculate docs so follow that if in doubt for layout. ## Usage @@ -29,6 +29,7 @@ docker create \ * `-e PGID` for GroupID - see below for explanation * `-e PUID` for UserID - see below for explanation +It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it /bin/bash`. ### User / Group Identifiers @@ -46,10 +47,9 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel Insert a basic user guide here to get a n00b up and running with the software inside the container. DELETE ME -## Updates +## Info * Shell access whilst the container is running: `docker exec -it container-name /bin/bash` -* Upgrade to the latest version: `docker restart container-name` * To monitor the logs of the container in realtime: `docker logs -f container-name` ## Versions diff --git a/template/cron/sample_cron b/template/cron/sample_cron deleted file mode 100644 index 4d899be..0000000 --- a/template/cron/sample_cron +++ /dev/null @@ -1 +0,0 @@ -* * * * * abc /path/to/command/to/run.sh diff --git a/template/init/sample b/template/init/sample deleted file mode 100644 index 3305d6b..0000000 --- a/template/init/sample +++ /dev/null @@ -1,5 +0,0 @@ -#!/sample/file - -Do not use numbers 00,01,99 for sorting -Baseimage contains 10_add_user_abc.sh - \ No newline at end of file diff --git a/template/defaults/sample.conf b/template/root/defaults/sample.conf similarity index 100% rename from template/defaults/sample.conf rename to template/root/defaults/sample.conf diff --git a/template/root/etc/cont-init.d/30-sample b/template/root/etc/cont-init.d/30-sample new file mode 100644 index 0000000..cac6283 --- /dev/null +++ b/template/root/etc/cont-init.d/30-sample @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash +### above is proper shebang for image using s6 + + diff --git a/template/root/etc/services.d/servicename/run b/template/root/etc/services.d/servicename/run new file mode 100644 index 0000000..e7ea7cf --- /dev/null +++ b/template/root/etc/services.d/servicename/run @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv bash +exec \ + s6-setuidgid abc /command/to/execute diff --git a/template/services/servicename/run b/template/services/servicename/run deleted file mode 100644 index 926a09f..0000000 --- a/template/services/servicename/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec /sbin/setuser abc "/command/to/execute" \ No newline at end of file