From 3f0556d7ea6714fb471dd3e48408a1c22cae5ea1 Mon Sep 17 00:00:00 2001 From: Heds Simons Date: Tue, 26 Mar 2019 11:29:28 +0000 Subject: [PATCH] nginx: Mask nginx service after install Connects-to: #34 Change-type: patch Signed-off-by: Heds Simons --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7a5d6be..ec32497 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM balena/open-balena-base:v7.0.0 ENV NGINX_VERSION 1.14.2-1~stretch ENV YARN_VERSION 1.13.0-1 +# Note that we stop nginx from being available in systemd, as we run it manually in downstream images RUN echo 'deb http://deb.debian.org/debian jessie main' >> /etc/apt/sources.list \ && wget -q -O - https://nginx.org/keys/nginx_signing.key | apt-key add - \ && echo 'deb http://nginx.org/packages/debian/ stretch nginx' >> /etc/apt/sources.list \ @@ -15,4 +16,5 @@ RUN echo 'deb http://deb.debian.org/debian jessie main' >> /etc/apt/sources.list && apt-get install yarn=${YARN_VERSION} google-chrome-stable nginx=${NGINX_VERSION} -y \ && rm /etc/init.d/nginx \ && rm -rf /etc/nginx/conf.d/* \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && systemctl mask nginx.service