mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
delete all root process
This commit is contained in:
parent
c34874716a
commit
9cbccd93dc
@ -1,9 +1,13 @@
|
|||||||
FROM alpine:3.4
|
FROM alpine:3.4
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ARG BOINC_USER_ID=35854
|
ARG BUILD_CORES
|
||||||
|
|
||||||
RUN BUILD_DEPS=" \
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
|
RUN echo "@community https://nl.alpinelinux.org/alpine/v3.4/community" >> /etc/apk/repositories \
|
||||||
|
&& NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
|
||||||
|
&& BUILD_DEPS=" \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
m4 \
|
m4 \
|
||||||
@ -14,6 +18,8 @@ RUN BUILD_DEPS=" \
|
|||||||
libnotify-dev" \
|
libnotify-dev" \
|
||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
|
su-exec \
|
||||||
|
tini@community \
|
||||||
libnotify \
|
libnotify \
|
||||||
libstdc++ \
|
libstdc++ \
|
||||||
curl \
|
curl \
|
||||||
@ -22,13 +28,15 @@ RUN BUILD_DEPS=" \
|
|||||||
&& cd boinc \
|
&& cd boinc \
|
||||||
&& ./_autosetup \
|
&& ./_autosetup \
|
||||||
&& ./configure --disable-server --enable-client CXXFLAGS="-O3 " \
|
&& ./configure --disable-server --enable-client CXXFLAGS="-O3 " \
|
||||||
&& make \
|
&& make -j ${NB_CORES} \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& adduser -h /home/boinc -D -s /sbin/nologin -u ${BOINC_USER_ID} boinc \
|
|
||||||
&& apk del ${BUILD_DEPS} \
|
&& apk del ${BUILD_DEPS} \
|
||||||
&& rm -rf /var/cache/apk/* /tmp/*
|
&& rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
USER boinc
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
WORKDIR /home/boinc
|
|
||||||
VOLUME /home/boinc
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
ENTRYPOINT [ "boinc" ]
|
|
||||||
|
VOLUME /boinc
|
||||||
|
|
||||||
|
CMD ["run.sh"]
|
||||||
|
3
boinc/run.sh
Normal file
3
boinc/run.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
chown -R $UID:$GID /boinc && cd /boinc
|
||||||
|
exec su-exec $UID:$GID /sbin/tini -- boinc
|
@ -115,4 +115,4 @@ LABEL description="Secure nginx built from source." \
|
|||||||
openssl="BoringSSL (date of the container)." \
|
openssl="BoringSSL (date of the container)." \
|
||||||
nginx="nginx ${NGINX_VERSION}."
|
nginx="nginx ${NGINX_VERSION}."
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
chown -R $UID:$GID /etc/nginx /var/log/nginx /var/run/nginx.pid /sites-enabled /conf.d /certs /www /tmp
|
chown -R $UID:$GID /etc/nginx /var/log/nginx /var/run/nginx.pid /sites-enabled /conf.d /certs /www /tmp
|
||||||
chmod -R 700 /certs
|
chmod -R 700 /certs
|
||||||
su-exec $UID:$GID nginx
|
exec su-exec $UID:$GID /sbin/tini -- nginx
|
||||||
|
@ -80,5 +80,7 @@ COPY run.sh /usr/local/bin/run.sh
|
|||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
VOLUME /cowrie/log /cowrie/dl /cowrie/custom
|
VOLUME /cowrie/log /cowrie/dl /cowrie/custom
|
||||||
|
|
||||||
EXPOSE 2222
|
EXPOSE 2222
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
|
||||||
|
CMD ["run.sh"]
|
||||||
|
@ -15,4 +15,4 @@ mkdir -p /cowrie/log/tty
|
|||||||
cp -R /cowrie/custom/* /cowrie
|
cp -R /cowrie/custom/* /cowrie
|
||||||
chown -R $UID:$GID /cowrie
|
chown -R $UID:$GID /cowrie
|
||||||
|
|
||||||
su-exec $UID:$GID twistd -n -l /cowrie/log/cowrie.log cowrie
|
exec su-exec $UID:$GID /sbin/tini -- twistd -n -l /cowrie/log/cowrie.log cowrie
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
FROM wonderfall/node:stable
|
FROM xataz/node:6
|
||||||
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ARG VERSION=0.10.1
|
ARG VERSION=0.10.1
|
||||||
|
|
||||||
@ -63,4 +63,4 @@ EXPOSE 2368
|
|||||||
LABEL description="Ghost CMS ready for production" \
|
LABEL description="Ghost CMS ready for production" \
|
||||||
ghost="Ghost v$VERSION"
|
ghost="Ghost v$VERSION"
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -55,4 +55,4 @@ if [ "$SYNTAX_HIGHLIGHTING" == "True" ] && [ ! -f /ghost/content/themes/casper/a
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $UID:$GID /ghost && cd /ghost
|
chown -R $UID:$GID /ghost && cd /ghost
|
||||||
su-exec $UID:$GID npm start --production
|
exec su-exec $UID:$GID tini -- npm start --production
|
||||||
|
@ -28,8 +28,11 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& rm -rf /var/cache/apk/* /tmp/*
|
&& rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
VOLUME /db /config
|
VOLUME /db /config
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
|
||||||
|
CMD ["run.sh"]
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
chown -R $UID:$GID /db /config
|
chown -R $UID:$GID /db /config
|
||||||
su-exec $UID:$GID isso -c /config/isso.conf run
|
exec su-exec $UID:$GID /sbin/tini -- isso -c /config/isso.conf run
|
||||||
|
@ -18,7 +18,6 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
nginx \
|
nginx \
|
||||||
libwebp \
|
|
||||||
php7-mbstring@commuedge \
|
php7-mbstring@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-exif@commuedge \
|
php7-exif@commuedge \
|
||||||
@ -29,7 +28,8 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
php7-session@commuedge \
|
php7-session@commuedge \
|
||||||
php7-pear@commuedge \
|
php7-pear@commuedge \
|
||||||
php7-dev@commuedge \
|
php7-dev@commuedge \
|
||||||
supervisor \
|
s6 \
|
||||||
|
su-exec \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
tini@commuedge \
|
tini@commuedge \
|
||||||
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \
|
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \
|
||||||
@ -48,11 +48,13 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
COPY s6.d /etc/s6.d
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /lychee/uploads /lychee/data
|
VOLUME /lychee/uploads /lychee/data
|
||||||
EXPOSE 80
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
EXPOSE 8888
|
||||||
|
|
||||||
|
CMD ["run.sh"]
|
||||||
|
@ -23,4 +23,4 @@ Lychee is a free photo-management tool, which runs on your server or web-space.
|
|||||||
- **/lychee/data** : data files.
|
- **/lychee/data** : data files.
|
||||||
|
|
||||||
#### Ports
|
#### Ports
|
||||||
- **80** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
user lychee;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -47,7 +46,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
root /lychee;
|
root /lychee;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
@ -65,7 +64,7 @@ http {
|
|||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.*\.php)(/.*)?$;
|
fastcgi_split_path_info ^(.*\.php)(/.*)?$;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
daemonize = no
|
daemonize = no
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
user = lychee
|
listen = /tmp/php-fpm.sock
|
||||||
group = lychee
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = lychee
|
|
||||||
listen.group = lychee
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 5
|
pm.max_children = 5
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} lychee && adduser -h /lychee -s /bin/sh -D -G lychee -u ${UID} lychee
|
|
||||||
mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb
|
mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb
|
||||||
chown -R lychee:lychee /lychee /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R $UID:$GID /lychee /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||||
exec supervisord -c /usr/local/etc/supervisord.conf
|
exec su-exec $UID:$GID /sbin/tini -- /bin/s6-svscan /etc/s6.d
|
||||||
|
2
lychee/s6.d/nginx/run
Normal file
2
lychee/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
lychee/s6.d/php/run
Normal file
2
lychee/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,8 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -4,7 +4,7 @@ MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
|||||||
ARG NEXTCLOUD_VERSION=10.0.0
|
ARG NEXTCLOUD_VERSION=10.0.0
|
||||||
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||||
|
|
||||||
ENV GID=991 UID=991
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
@ -12,13 +12,12 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
s6 \
|
||||||
openssl \
|
openssl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
libsmbclient \
|
libsmbclient \
|
||||||
samba-client \
|
samba-client \
|
||||||
su-exec \
|
su-exec \
|
||||||
tini@commuedge \
|
|
||||||
php7@commuedge \
|
php7@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-intl@commuedge \
|
php7-intl@commuedge \
|
||||||
@ -70,18 +69,18 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
||||||
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
COPY occ /usr/local/bin/occ
|
COPY occ /usr/local/bin/occ
|
||||||
COPY cron /etc/periodic/15min/nextcloud
|
COPY cron /etc/periodic/15min/nextcloud
|
||||||
|
COPY s6.d /etc/s6.d
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud
|
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /data /config /apps2
|
VOLUME /data /config /apps2
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 8888
|
||||||
|
|
||||||
LABEL description="A server software for creating file hosting services" \
|
LABEL description="A server software for creating file hosting services" \
|
||||||
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}"
|
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}"
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
su - nextcloud -c "php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
user nextcloud;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -50,7 +49,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /nextcloud;
|
root /nextcloud;
|
||||||
client_max_body_size 10G;
|
client_max_body_size 10G;
|
||||||
@ -94,7 +93,7 @@ http {
|
|||||||
fastcgi_param modHeadersAvailable true;
|
fastcgi_param modHeadersAvailable true;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||||
fastcgi_param PATH_INFO $2;
|
fastcgi_param PATH_INFO $2;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
su-exec nextcloud:nextcloud php7 /nextcloud/occ $@
|
su-exec $UID:$GID php7 /nextcloud/occ $@
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
daemonize = no
|
daemonize = no
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
user = nextcloud
|
listen = /tmp/php-fpm.sock
|
||||||
group = nextcloud
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = nextcloud
|
|
||||||
listen.group = nextcloud
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 10
|
pm.max_children = 10
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
|
||||||
|
|
||||||
# Set default data directory
|
|
||||||
if [ ! -f /config/config.php ]; then
|
if [ ! -f /config/config.php ]; then
|
||||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log/nginx /var/log/php7 /var/lib/nginx /tmp /etc/s6.d
|
||||||
ln -s /config/config.php /nextcloud/config/config.php
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
exec supervisord -c /etc/supervisor/supervisord.conf
|
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
||||||
|
2
nextcloud/10.0/s6.d/cron/run
Normal file
2
nextcloud/10.0/s6.d/cron/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec crond -f
|
2
nextcloud/10.0/s6.d/nginx/run
Normal file
2
nextcloud/10.0/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
nextcloud/10.0/s6.d/php/run
Normal file
2
nextcloud/10.0/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,11 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:cron]
|
|
||||||
command=crond -f
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -4,7 +4,7 @@ MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
|||||||
ARG NEXTCLOUD_VERSION=9.0.53
|
ARG NEXTCLOUD_VERSION=9.0.53
|
||||||
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||||
|
|
||||||
ENV GID=991 UID=991
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
@ -12,13 +12,12 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
s6 \
|
||||||
openssl \
|
openssl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
libsmbclient \
|
libsmbclient \
|
||||||
samba-client \
|
samba-client \
|
||||||
su-exec \
|
su-exec \
|
||||||
tini@commuedge \
|
|
||||||
php7@commuedge \
|
php7@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-intl@commuedge \
|
php7-intl@commuedge \
|
||||||
@ -70,18 +69,18 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
||||||
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
COPY occ /usr/local/bin/occ
|
COPY occ /usr/local/bin/occ
|
||||||
COPY cron /etc/periodic/15min/nextcloud
|
COPY cron /etc/periodic/15min/nextcloud
|
||||||
|
COPY s6.d /etc/s6.d
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud
|
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /data /config /apps2
|
VOLUME /data /config /apps2
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 8888
|
||||||
|
|
||||||
LABEL description="A server software for creating file hosting services" \
|
LABEL description="A server software for creating file hosting services" \
|
||||||
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}"
|
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}"
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
su - nextcloud -c "php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
user nextcloud;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -50,7 +49,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /nextcloud;
|
root /nextcloud;
|
||||||
client_max_body_size 10G;
|
client_max_body_size 10G;
|
||||||
@ -94,7 +93,7 @@ http {
|
|||||||
fastcgi_param modHeadersAvailable true;
|
fastcgi_param modHeadersAvailable true;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||||
fastcgi_param PATH_INFO $2;
|
fastcgi_param PATH_INFO $2;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
daemonize = no
|
daemonize = no
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
user = nextcloud
|
listen = /tmp/php-fpm.sock
|
||||||
group = nextcloud
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = nextcloud
|
|
||||||
listen.group = nextcloud
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 10
|
pm.max_children = 10
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
|
||||||
|
|
||||||
# Set default data directory
|
|
||||||
if [ ! -f /config/config.php ]; then
|
if [ ! -f /config/config.php ]; then
|
||||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log/nginx /var/log/php7 /var/lib/nginx /tmp /etc/s6.d
|
||||||
ln -s /config/config.php /nextcloud/config/config.php
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
exec supervisord -c /etc/supervisor/supervisord.conf
|
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
||||||
|
2
nextcloud/9.0/s6.d/cron/run
Normal file
2
nextcloud/9.0/s6.d/cron/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec crond -f
|
2
nextcloud/9.0/s6.d/nginx/run
Normal file
2
nextcloud/9.0/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
nextcloud/9.0/s6.d/php/run
Normal file
2
nextcloud/9.0/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,11 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:cron]
|
|
||||||
command=crond -f
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -30,7 +30,7 @@
|
|||||||
- **GID** : nextcloud group id *(default : 991)*
|
- **GID** : nextcloud group id *(default : 991)*
|
||||||
|
|
||||||
#### Port
|
#### Port
|
||||||
- **80**.
|
- **8888** (recently changed, nginx now runs without root)
|
||||||
|
|
||||||
#### Volumes
|
#### Volumes
|
||||||
- **/data** : Nextcloud data.
|
- **/data** : Nextcloud data.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.4
|
FROM alpine:3.4
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ENV GID=991 UID=991
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
@ -9,13 +9,12 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
s6 \
|
||||||
openssl \
|
openssl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
libsmbclient \
|
libsmbclient \
|
||||||
samba-client \
|
samba-client \
|
||||||
su-exec \
|
su-exec \
|
||||||
tini@commuedge \
|
|
||||||
php7@commuedge \
|
php7@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-intl@commuedge \
|
php7-intl@commuedge \
|
||||||
@ -54,18 +53,18 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
||||||
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
COPY occ /usr/local/bin/occ
|
COPY occ /usr/local/bin/occ
|
||||||
COPY cron /etc/periodic/15min/nextcloud
|
COPY cron /etc/periodic/15min/nextcloud
|
||||||
|
COPY s6.d /etc/s6.d
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud
|
RUN chmod +x /usr/local/bin/* /etc/periodic/15min/nextcloud /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /data /config /apps2
|
VOLUME /data /config /apps2
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 8888
|
||||||
|
|
||||||
LABEL description="A server software for creating file hosting services" \
|
LABEL description="A server software for creating file hosting services" \
|
||||||
nextcloud="Nextcloud daily build"
|
nextcloud="Nextcloud daily build"
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
su - nextcloud -c "php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
php7 -f /nextcloud/cron.php" > /dev/null 2>&1
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
user nextcloud;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -50,7 +49,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
index index.php;
|
index index.php;
|
||||||
root /nextcloud;
|
root /nextcloud;
|
||||||
client_max_body_size 10G;
|
client_max_body_size 10G;
|
||||||
@ -94,7 +93,7 @@ http {
|
|||||||
fastcgi_param modHeadersAvailable true;
|
fastcgi_param modHeadersAvailable true;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
fastcgi_param SCRIPT_FILENAME $document_root$1;
|
||||||
fastcgi_param PATH_INFO $2;
|
fastcgi_param PATH_INFO $2;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
daemonize = no
|
daemonize = no
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
user = nextcloud
|
listen = /tmp/php-fpm.sock
|
||||||
group = nextcloud
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = nextcloud
|
|
||||||
listen.group = nextcloud
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 10
|
pm.max_children = 10
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
@ -19,3 +15,4 @@ php_admin_value[post_max_size] = 10G
|
|||||||
php_admin_value[upload_max_filesize] = 10G
|
php_admin_value[upload_max_filesize] = 10G
|
||||||
php_admin_value[max_execution_time] = 10800
|
php_admin_value[max_execution_time] = 10800
|
||||||
php_admin_value[max_input_time] = 1200
|
php_admin_value[max_input_time] = 1200
|
||||||
|
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
|
||||||
|
|
||||||
# Set default data directory
|
|
||||||
if [ ! -f /config/config.php ]; then
|
if [ ! -f /config/config.php ]; then
|
||||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log/nginx /var/log/php7 /var/lib/nginx /tmp /etc/s6.d
|
||||||
ln -s /config/config.php /nextcloud/config/config.php
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
exec supervisord -c /etc/supervisor/supervisord.conf
|
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
||||||
|
2
nextcloud/daily/s6.d/cron/run
Normal file
2
nextcloud/daily/s6.d/cron/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec crond -f
|
2
nextcloud/daily/s6.d/nginx/run
Normal file
2
nextcloud/daily/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
nextcloud/daily/s6.d/php/run
Normal file
2
nextcloud/daily/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,11 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:cron]
|
|
||||||
command=crond -f
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -121,4 +121,4 @@ LABEL description="nginx built from source." \
|
|||||||
openssl="LibreSSL ${LIBRESSL_VERSION}." \
|
openssl="LibreSSL ${LIBRESSL_VERSION}." \
|
||||||
nginx="nginx ${NGINX_VERSION}."
|
nginx="nginx ${NGINX_VERSION}."
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
touch /var/run/nginx.pid
|
|
||||||
chown -R $UID:$GID /etc/nginx /var/log/nginx /var/run/nginx.pid /sites-enabled /conf.d /certs /www /tmp
|
chown -R $UID:$GID /etc/nginx /var/log/nginx /var/run/nginx.pid /sites-enabled /conf.d /certs /www /tmp
|
||||||
chmod -R 700 /certs
|
chmod -R 700 /certs
|
||||||
su-exec $UID:$GID nginx
|
exec su-exec $UID:$GID /sbin/tini -- nginx
|
||||||
|
@ -8,7 +8,8 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
$BUILD_DEPS \
|
$BUILD_DEPS \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
s6 \
|
||||||
|
su-exec \
|
||||||
tini@commuedge \
|
tini@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-gd@commuedge \
|
php7-gd@commuedge \
|
||||||
@ -23,13 +24,13 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
COPY s6.d /etc/s6.d
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /zerobin/data
|
VOLUME /zerobin/data
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 8888
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -15,4 +15,4 @@ Paste securely.
|
|||||||
- **/zerobin/data**
|
- **/zerobin/data**
|
||||||
|
|
||||||
#### Ports
|
#### Ports
|
||||||
- **80** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
user zerobin;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -47,7 +46,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
root /zerobin;
|
root /zerobin;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ http {
|
|||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include /etc/nginx/fastcgi_params;
|
include /etc/nginx/fastcgi_params;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
[www]
|
[www]
|
||||||
user = zerobin
|
listen = /tmp/php-fpm.sock
|
||||||
group = zerobin
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = zerobin
|
|
||||||
listen.group = zerobin
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 5
|
pm.max_children = 5
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} zerobin && adduser -h /zerobin -s /bin/sh -D -G zerobin -u ${UID} zerobin
|
chown -R $UID:$GID /zerobin /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||||
touch /var/run/php-fpm.sock
|
exec su-exec $UID:$GID /sbin/tini -- /bin/s6-svscan /etc/s6.d
|
||||||
chown -R zerobin:zerobin /zerobin /var/run/php-fpm.sock /var/lib/nginx /tmp
|
|
||||||
exec supervisord -c /usr/local/etc/supervisord.conf
|
|
||||||
|
2
privatebin/s6.d/nginx/run
Normal file
2
privatebin/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
privatebin/s6.d/php/run
Normal file
2
privatebin/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,8 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7 --nodaemonize
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -3,13 +3,14 @@ MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
|||||||
|
|
||||||
ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
|
ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
|
||||||
|
|
||||||
ENV GID=991 UID=991
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
gnupg \
|
gnupg \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
s6 \
|
||||||
|
su-exec \
|
||||||
tini@commuedge \
|
tini@commuedge \
|
||||||
php7-fpm@commuedge \
|
php7-fpm@commuedge \
|
||||||
php7-curl@commuedge \
|
php7-curl@commuedge \
|
||||||
@ -41,11 +42,13 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
COPY s6.d /etc/s6.d
|
||||||
COPY run.sh /usr/local/bin/run.sh
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/*
|
||||||
|
|
||||||
VOLUME /rainloop/data
|
VOLUME /rainloop/data
|
||||||
EXPOSE 80
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
EXPOSE 8888
|
||||||
|
|
||||||
|
CMD ["run.sh"]
|
||||||
|
@ -11,7 +11,6 @@ Rainloop is a simple, modern & fast web-based client. More info on the [official
|
|||||||
- Contacts (DB) : sqlite, or mysql (server not built-in)
|
- Contacts (DB) : sqlite, or mysql (server not built-in)
|
||||||
- nginx + PHP7
|
- nginx + PHP7
|
||||||
|
|
||||||
|
|
||||||
#### Build-time variables
|
#### Build-time variables
|
||||||
- **GPG_rainloop** : fingerprint of signing key
|
- **GPG_rainloop** : fingerprint of signing key
|
||||||
|
|
||||||
@ -22,6 +21,9 @@ Rainloop is a simple, modern & fast web-based client. More info on the [official
|
|||||||
#### Volumes
|
#### Volumes
|
||||||
- **/rainloop/data** : data files.
|
- **/rainloop/data** : data files.
|
||||||
|
|
||||||
|
#### Ports
|
||||||
|
- **8888***
|
||||||
|
|
||||||
#### Reverse proxy
|
#### Reverse proxy
|
||||||
https://github.com/Wonderfall/dockerfiles/tree/master/reverse
|
https://github.com/Wonderfall/dockerfiles/tree/master/reverse
|
||||||
https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
|
https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
|
@ -1,6 +1,5 @@
|
|||||||
user rainloop;
|
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /var/run/nginx.pid;
|
pid /tmp/nginx.pid;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
@ -47,7 +46,7 @@ http {
|
|||||||
image/svg+xml;
|
image/svg+xml;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8888;
|
||||||
root /rainloop;
|
root /rainloop;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ http {
|
|||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include /etc/nginx/fastcgi_params;
|
include /etc/nginx/fastcgi_params;
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
daemonize = no
|
daemonize = no
|
||||||
|
|
||||||
[www]
|
[www]
|
||||||
user = rainloop
|
listen = /tmp/php-fpm.sock
|
||||||
group = rainloop
|
|
||||||
listen = /var/run/php-fpm.sock
|
|
||||||
listen.owner = rainloop
|
|
||||||
listen.group = rainloop
|
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 5
|
pm.max_children = 5
|
||||||
pm.start_servers = 2
|
pm.start_servers = 2
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} rainloop && adduser -h /rainloop -s /bin/sh -D -G rainloop -u ${UID} rainloop
|
chown -R $UID:$GID /rainloop /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||||
chown -R rainloop:rainloop /rainloop /var/run/php-fpm.sock /var/lib/nginx /tmp
|
exec su-exec $UID:$GID /sbin/tini -- /bin/s6-svscan /etc/s6.d
|
||||||
exec supervisord -c /usr/local/etc/supervisord.conf
|
|
||||||
|
2
rainloop/s6.d/nginx/run
Normal file
2
rainloop/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec nginx
|
2
rainloop/s6.d/php/run
Normal file
2
rainloop/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec php-fpm7
|
@ -1,8 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[program:php-fpm]
|
|
||||||
command=php-fpm7
|
|
||||||
|
|
||||||
[program:nginx]
|
|
||||||
command=nginx
|
|
@ -1,7 +1,8 @@
|
|||||||
FROM alpine:3.4
|
FROM alpine:3.4
|
||||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ENV BASE_URL=False IMAGE_PROXY=False
|
ENV BASE_URL=False IMAGE_PROXY=False \
|
||||||
|
UID=991 GID=991
|
||||||
|
|
||||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||||
&& BUILD_DEPS=" \
|
&& BUILD_DEPS=" \
|
||||||
@ -16,6 +17,7 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
ca-certificates" \
|
ca-certificates" \
|
||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
|
su-exec \
|
||||||
python \
|
python \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
libxslt \
|
libxslt \
|
||||||
@ -25,8 +27,6 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
|||||||
&& mkdir /usr/local/searx && cd /usr/local/searx \
|
&& mkdir /usr/local/searx && cd /usr/local/searx \
|
||||||
&& wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \
|
&& wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \
|
||||||
&& sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \
|
&& sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \
|
||||||
&& adduser -D -h /usr/local/searx -s /bin/sh searx searx \
|
|
||||||
&& chown -R searx:searx /usr/local/searx \
|
|
||||||
&& apk del ${BUILD_DEPS} \
|
&& apk del ${BUILD_DEPS} \
|
||||||
&& rm -f /var/cache/apk/*
|
&& rm -f /var/cache/apk/*
|
||||||
|
|
||||||
@ -34,8 +34,6 @@ COPY run.sh /usr/local/bin/run.sh
|
|||||||
|
|
||||||
RUN chmod +x /usr/local/bin/run.sh
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
USER searx
|
|
||||||
|
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
|
|
||||||
CMD ["/sbin/tini","--","run.sh"]
|
CMD ["run.sh"]
|
||||||
|
@ -4,4 +4,4 @@ sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \
|
|||||||
-e "s/ultrasecretkey/$(openssl rand -hex 16)/g" \
|
-e "s/ultrasecretkey/$(openssl rand -hex 16)/g" \
|
||||||
/usr/local/searx/searx/settings.yml
|
/usr/local/searx/searx/settings.yml
|
||||||
|
|
||||||
exec python /usr/local/searx/searx/webapp.py
|
exec su-exec $UID:$GID /sbin/tini -- python /usr/local/searx/searx/webapp.py
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
FROM alpine:3.4
|
FROM alpine:3.4
|
||||||
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||||
|
|
||||||
ARG TOR_VERSION=0.2.8.7
|
ARG TOR_VERSION=0.2.8.7
|
||||||
ARG TOR_USER_ID=45553
|
|
||||||
ARG ARM_VERSION=1.4.5.0
|
ARG ARM_VERSION=1.4.5.0
|
||||||
|
|
||||||
ARG GPG_Mathewson="B35B F85B F194 89D0 4E28 C33C 2119 4EBB 1657 33EA"
|
ARG GPG_Mathewson="B35B F85B F194 89D0 4E28 C33C 2119 4EBB 1657 33EA"
|
||||||
ARG GPG_Johnson="6827 8CC5 DD2D 1E85 C4E4 5AD9 0445 B7AB 9ABB EEC6"
|
ARG GPG_Johnson="6827 8CC5 DD2D 1E85 C4E4 5AD9 0445 B7AB 9ABB EEC6"
|
||||||
|
|
||||||
ENV TERM=xterm
|
ENV TERM=xterm \
|
||||||
|
UID=991 GID=991
|
||||||
|
|
||||||
RUN BUILD_DEPS=" \
|
RUN echo "@community https://nl.alpinelinux.org/alpine/v3.4/community" >> /etc/apk/repositories \
|
||||||
|
&& BUILD_DEPS=" \
|
||||||
libevent-dev \
|
libevent-dev \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
build-base \
|
build-base \
|
||||||
@ -17,6 +19,8 @@ RUN BUILD_DEPS=" \
|
|||||||
ca-certificates" \
|
ca-certificates" \
|
||||||
&& apk -U add \
|
&& apk -U add \
|
||||||
${BUILD_DEPS} \
|
${BUILD_DEPS} \
|
||||||
|
su-exec \
|
||||||
|
tini@community \
|
||||||
python \
|
python \
|
||||||
libevent \
|
libevent \
|
||||||
openssl \
|
openssl \
|
||||||
@ -33,7 +37,6 @@ RUN BUILD_DEPS=" \
|
|||||||
&& echo "All seems good, now unpacking ${TOR_TARBALL}..." \
|
&& echo "All seems good, now unpacking ${TOR_TARBALL}..." \
|
||||||
&& tar xzf ${TOR_TARBALL} && cd tor-${TOR_VERSION} \
|
&& tar xzf ${TOR_TARBALL} && cd tor-${TOR_VERSION} \
|
||||||
&& ./configure --disable-asciidoc && make && make install \
|
&& ./configure --disable-asciidoc && make && make install \
|
||||||
&& adduser -h /var/run/tor -D -s /sbin/nologin -u ${TOR_USER_ID} tor \
|
|
||||||
&& cd /tmp \
|
&& cd /tmp \
|
||||||
&& ARM_TARBALL="arm-${ARM_VERSION}.tar.bz2" \
|
&& ARM_TARBALL="arm-${ARM_VERSION}.tar.bz2" \
|
||||||
&& wget -q https://www.atagar.com/arm/resources/static/${ARM_TARBALL} \
|
&& wget -q https://www.atagar.com/arm/resources/static/${ARM_TARBALL} \
|
||||||
@ -49,8 +52,12 @@ RUN BUILD_DEPS=" \
|
|||||||
&& apk del ${BUILD_DEPS} \
|
&& apk del ${BUILD_DEPS} \
|
||||||
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
|
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
|
||||||
|
|
||||||
VOLUME /usr/local/etc/tor /tordata
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
EXPOSE 9001 9030
|
|
||||||
USER tor
|
|
||||||
|
|
||||||
ENTRYPOINT [ "tor" ]
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
|
VOLUME /tor/config /tor/data
|
||||||
|
|
||||||
|
EXPOSE 9001 9030
|
||||||
|
|
||||||
|
ENTRYPOINT ["run.sh"]
|
||||||
|
3
tor/run.sh
Normal file
3
tor/run.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
chown -R $UID:$GID /tor
|
||||||
|
exec su-exec $UID:$GID tini -- tor $@
|
Loading…
x
Reference in New Issue
Block a user