From 1192fe4ee10bee3d4b1514364b9f0fcba565d078 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sat, 2 Jul 2016 00:37:13 +0100 Subject: [PATCH] rebase to alpine --- Dockerfile | 31 ++++++++++++------------------- README.md | 8 ++++---- root/etc/cont-init.d/30-config | 3 +++ root/etc/services.d/syncthing/run | 5 +++++ services/syncthing/run | 5 ----- 5 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 root/etc/cont-init.d/30-config create mode 100644 root/etc/services.d/syncthing/run delete mode 100644 services/syncthing/run diff --git a/Dockerfile b/Dockerfile index 71e17ef..ae7b9bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,17 @@ -FROM linuxserver/baseimage -MAINTAINER lonix -ENV APTLIST="syncthing" +FROM lsiobase/alpine +MAINTAINER sparklyballs -#Applying stuff -RUN curl -s https://syncthing.net/release-key.txt | apt-key add - && \ -echo deb http://apt.syncthing.net/ syncthing release | tee /etc/apt/sources.list.d/syncthing-release.list && \ -apt-get update -q && \ -apt-get install -qy $APTLIST && \ +# environment settings +ENV HOME="/config" -# give abc home folder of /config -usermod -d /config abc && \ +# install packages +RUN \ + apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/community \ + syncthing -# clean up -apt-get clean && \ -rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* +# add local files +COPY root/ / -#Adding Custom files -ADD services/ /etc/service/ -RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh - -# Volumes and Ports +# ports and volumes VOLUME ["/config", "/sync"] -EXPOSE 8384 22000 21027/UDP \ No newline at end of file +EXPOSE 8384 22000 21027/UDP diff --git a/README.md b/README.md index cee7095..c0a2412 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![https://linuxserver.io](https://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) -The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring auto-update on startup, easy user mapping and community support. Find us for support at: +The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring easy user mapping and community support. Find us for support at: * [forum.linuxserver.io](https://forum.linuxserver.io) * [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io` @@ -52,10 +52,10 @@ You can find some of the best documentation available on the web at [docs.syncth ## Misc * Shell access whilst the container is running: `docker exec -it syncthing /bin/bash` -* Upgrade to the latest version: `docker restart syncthing` * To monitor the logs of the container in realtime: `docker logs -f syncthing` ## Versions -+ **18.12.2015:** Initial testing / release (IronicBadger) -+ **24.09.2015:** Inital dev complete (Lonix) ++ **02.07.16:** Rebase to alpine for smaller image size. ++ **18.12.15:** Initial testing / release (IronicBadger) ++ **24.09.15:** Inital dev complete (Lonix) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config new file mode 100644 index 0000000..0fc5d46 --- /dev/null +++ b/root/etc/cont-init.d/30-config @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv sh + +chown abc:abc /sync diff --git a/root/etc/services.d/syncthing/run b/root/etc/services.d/syncthing/run new file mode 100644 index 0000000..2c15b8a --- /dev/null +++ b/root/etc/services.d/syncthing/run @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bash + +umask 0000 + +exec s6-setuidgid abc syncthing -home=/config -no-browser -no-restart --gui-address="0.0.0.0:8384" diff --git a/services/syncthing/run b/services/syncthing/run deleted file mode 100644 index 7e864f1..0000000 --- a/services/syncthing/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -umask 0000 - -exec /sbin/setuser abc syncthing -home=/config -no-browser -no-restart --gui-address="0.0.0.0:8384" \ No newline at end of file