From 4a92cbc0478660292ef3eba8b0573c3bb85e13b4 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Fri, 12 Aug 2016 14:03:58 +0100 Subject: [PATCH 1/3] rebase to alpine --- Dockerfile | 31 ++++++++++++----------- READMETEMPLATE.md | 45 ---------------------------------- init/30_install_davos.sh | 5 ---- root/etc/cont-init.d/30-config | 8 ++++++ root/etc/services.d/davos/run | 4 +++ services/davos/run | 2 -- 6 files changed, 29 insertions(+), 66 deletions(-) delete mode 100644 READMETEMPLATE.md delete mode 100644 init/30_install_davos.sh create mode 100644 root/etc/cont-init.d/30-config create mode 100644 root/etc/services.d/davos/run delete mode 100644 services/davos/run diff --git a/Dockerfile b/Dockerfile index 4e4dbfc..9f68dcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,24 @@ -FROM linuxserver/baseimage +FROM lsiobase/alpine MAINTAINER Josh Stark -ENV APTLIST="oracle-java8-set-default oracle-java8-installer" +# package version +ARG DAVOS_VER="latest" +# install packages +RUN \ + apk add --no-cache \ + curl \ + openjdk8-jre && \ -RUN add-apt-repository ppa:webupd8team/java && \ -apt-get update -q && \ -echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ -apt-get install $APTLIST -qy && \ -apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* && \ -mkdir /download +# install davos +RUN \ + curl -o \ + /app/davos.jar -L \ + http://files.linuxserver.io/davos/davos-${DAVOS_VER}.jar -#Adding Custom files -ADD init/ /etc/my_init.d/ -ADD services/ /etc/service/ -RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh +# add local files +COPY root/ / -# Volumes and Ports -VOLUME /config /download +# ports and volumes EXPOSE 8080 +VOLUME /config /download diff --git a/READMETEMPLATE.md b/READMETEMPLATE.md deleted file mode 100644 index 997fbd5..0000000 --- a/READMETEMPLATE.md +++ /dev/null @@ -1,45 +0,0 @@ -![http://linuxserver.io](http://www.linuxserver.io/wp-content/uploads/2015/06/linuxserver_medium.png) - -The [LinuxServer.io](https://www.linuxserver.io/) team brings you another quality container release featuring auto-update on startup, easy user mapping and community support. Be sure to checkout our [forums](https://forum.linuxserver.io/index.php) or for real-time support our [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`. - -# linuxserver/ - - - -## Usage - -``` -docker create --name= -v /etc/localtime:/etc/localtime:ro -v :/config -e PGID= -e PUID= -p 1234:1234 linuxserver/ -``` - -**Parameters** - -* `-p 4242` - the port(s) -* `-v /etc/localtime` for timesync - *optional* -* `-v /config` - -* `-e PGID` for GroupID - see below for explanation -* `-e PUID` for UserID - see below for explanation - -It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do `docker exec -it /bin/bash`. - -### User / Group Identifiers - -**TL;DR** - The `PGID` and `PUID` values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended). - -Part of what makes our containers work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers. - -## Setting up the application - - DELETE ME - - -## Updates - -* Upgrade to the latest version simply `docker restart `. -* To monitor the logs of the container in realtime `docker logs -f `. - - - -## Versions - -+ **dd.MM.yyyy:** This is the standard Version type now. diff --git a/init/30_install_davos.sh b/init/30_install_davos.sh deleted file mode 100644 index 589f312..0000000 --- a/init/30_install_davos.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -curl -o /app/davos.jar https://ci.linuxserver.io/job/davos/job/davos_03_Release/ws/build/libs/davos-1.0.jar - -chown abc:abc /app/davos.jar diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config new file mode 100644 index 0000000..b5d37e0 --- /dev/null +++ b/root/etc/cont-init.d/30-config @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash + +# permissions +chown -R abc:abc \ + /app \ + /config +chown abc:abc \ + /download diff --git a/root/etc/services.d/davos/run b/root/etc/services.d/davos/run new file mode 100644 index 0000000..fd5600a --- /dev/null +++ b/root/etc/services.d/davos/run @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash + +exec \ + s6-setuidgid abc /usr/bin/java -jar /app/davos.jar diff --git a/services/davos/run b/services/davos/run deleted file mode 100644 index 211a6af..0000000 --- a/services/davos/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec /sbin/setuser abc java -jar /app/davos.jar From 3250d50ceaa5c08e347a70eef1cc432da5e24036 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Fri, 12 Aug 2016 14:13:19 +0100 Subject: [PATCH 2/3] rebase to alpine --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9f68dcc..7026628 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG DAVOS_VER="latest" RUN \ apk add --no-cache \ curl \ - openjdk8-jre && \ + openjdk8-jre # install davos RUN \ From 1460e768316cb4fcd524e415315ac5d025d6ecaf Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Fri, 12 Aug 2016 14:19:22 +0100 Subject: [PATCH 3/3] put davos in /app/davos --- Dockerfile | 4 +++- root/etc/services.d/davos/run | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7026628..f6df958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,10 @@ RUN \ # install davos RUN \ + mkdir -p \ + /app/davos && \ curl -o \ - /app/davos.jar -L \ + /app/davos/davos.jar -L \ http://files.linuxserver.io/davos/davos-${DAVOS_VER}.jar # add local files diff --git a/root/etc/services.d/davos/run b/root/etc/services.d/davos/run index fd5600a..ba91bcd 100644 --- a/root/etc/services.d/davos/run +++ b/root/etc/services.d/davos/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc /usr/bin/java -jar /app/davos.jar + s6-setuidgid abc /usr/bin/java -jar /app/davos/davos.jar