remove backwards compatibility with port 80 to drop setcap use, closes #15

master
El RIDO 4 years ago
parent c11b91da26
commit d83d136f45
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92

@ -10,7 +10,7 @@ ENV S6_READ_ONLY_ROOT 1
RUN \ RUN \
# Install dependencies # Install dependencies
apk add --no-cache gnupg libcap nginx php7-fpm php7-json php7-gd \ apk add --no-cache gnupg nginx php7-fpm php7-json php7-gd \
php7-opcache php7-pdo_mysql php7-pdo_pgsql tzdata \ php7-opcache php7-pdo_mysql php7-pdo_pgsql tzdata \
&& apk upgrade --no-cache \ && apk upgrade --no-cache \
# Remove (some of the) default nginx config # Remove (some of the) default nginx config
@ -51,12 +51,11 @@ RUN \
/etc/services.d/nginx/supervise/control \ /etc/services.d/nginx/supervise/control \
/etc/services.d/php-fpm7/supervise/control \ /etc/services.d/php-fpm7/supervise/control \
/etc/s6/services/s6-fdholderd/supervise/control \ /etc/s6/services/s6-fdholderd/supervise/control \
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
&& adduser nobody www-data \ && adduser nobody www-data \
&& chown -R nobody.www-data /etc/services.d /etc/s6 /run /srv/* /var/lib/nginx /var/www \ && chown -R nobody.www-data /etc/services.d /etc/s6 /run /srv/* /var/lib/nginx /var/www \
# Clean up # Clean up
&& rm -rf "${GNUPGHOME}" /tmp/* \ && rm -rf "${GNUPGHOME}" /tmp/* \
&& apk del gnupg libcap && apk del gnupg
COPY etc/ /etc/ COPY etc/ /etc/
@ -66,6 +65,6 @@ USER nobody:www-data
# mark dirs as volumes that need to be writable, allows running the container --read-only # mark dirs as volumes that need to be writable, allows running the container --read-only
VOLUME /run /srv/data /tmp /var/lib/nginx/tmp VOLUME /run /srv/data /tmp /var/lib/nginx/tmp
EXPOSE 80 8080 EXPOSE 8080
ENTRYPOINT ["/init"] ENTRYPOINT ["/init"]

@ -1,5 +1,4 @@
server { server {
listen 80 default_server;
listen 8080 default_server; listen 8080 default_server;
root /var/www; root /var/www;

Loading…
Cancel
Save