Reworked a lot of the image:

- Changed the base to jcgruenhage/baseimage-alpine
 - Fixed the caddy download URL
 - Added finish scripts (there are errors otherwise).
This commit is contained in:
Jan Christian Grünhage 2017-06-28 11:12:50 +02:00
parent 25c9159416
commit 10331e4ac6
Signed by: jcgruenhage
GPG key ID: 321A67D9EE8BC3E1
7 changed files with 10 additions and 12 deletions

View file

@ -1,5 +1,5 @@
FROM alpine:edge
MAINTAINER Jan Christian Grünhage <me@jcg.re>
FROM jcgruenhage/baseimage-alpine
MAINTAINER Jan Christian Grünhage <jan.christian@gruenhage.xyz>
ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
@ -9,7 +9,6 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/
&& apk add --update \
curl \
gnupg \
s6 \
su-exec \
php7-fpm@commuedge \
php7-curl@commuedge \
@ -24,7 +23,7 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/
php7-pdo_sqlite@commuedge \
php7-sqlite3@commuedge \
&& cd /tmp \
&& curl "https://caddyserver.com/download/build?os=linux&arch=amd64" \
&& curl "https://caddyserver.com/download/linux/amd64" \
| tar -C /usr/local/bin -xz caddy \
&& curl http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip > rainloop-community-latest.zip \
&& curl http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip.asc > rainloop-community-latest.zip.asc \
@ -46,6 +45,4 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/
COPY root /
EXPOSE 8888
VOLUME /rainloop/data
CMD ["/usr/local/bin/run.sh"]
VOLUME /rainloop/data

View file

@ -0,0 +1 @@
#!/bin/sh

1
root/etc/s6.d/caddy/finish Executable file
View file

@ -0,0 +1 @@
#!/bin/sh

View file

@ -1,2 +1,2 @@
#!/bin/sh
exec caddy --conf /etc/Caddyfile
su-exec ${UID}:${GID} caddy --conf /etc/Caddyfile

1
root/etc/s6.d/php/finish Executable file
View file

@ -0,0 +1 @@
#!/bin/sh

View file

@ -1,2 +1,3 @@
#!/bin/sh
exec php-fpm7
chown -R ${UID}:${GID} /rainloop /var/log/php7
su-exec ${UID}:${GID} php-fpm7

View file

@ -1,3 +0,0 @@
#!/bin/sh
chown -R $UID:$GID /rainloop /etc/Caddyfile /etc/php7 /var/log /tmp /etc/s6.d
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d