aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-20 22:51:36 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-20 22:51:36 +0200
commit6a45787cf0e5e16f8e2d812edeb3ecf621c885dd (patch)
tree99b415c794eaa7ad9dbfab855c55599f3e3e86c5 /docker
parentAdd UWSGI configuration. (diff)
Use unprivileged user.
Diffstat (limited to 'docker')
-rw-r--r--docker/app/alpine/3.6/Dockerfile6
-rw-r--r--docker/app/alpine/3.7/Dockerfile6
-rw-r--r--docker/app/stretch/3.6/Dockerfile6
-rw-r--r--docker/app/stretch/3.7/Dockerfile6
4 files changed, 24 insertions, 0 deletions
diff --git a/docker/app/alpine/3.6/Dockerfile b/docker/app/alpine/3.6/Dockerfile
index 8067adbd..8dadb0de 100644
--- a/docker/app/alpine/3.6/Dockerfile
+++ b/docker/app/alpine/3.6/Dockerfile
@@ -2,6 +2,11 @@ FROM python:3.6-alpine
ARG EXTRAS=deploy
+RUN adduser \
+ --disabled-login \
+ --no-create-home \
+ pysite
+
RUN apk add --no-cache --virtual build \
gcc \
linux-headers \
@@ -18,4 +23,5 @@ RUN apk del --purge build
COPY . .
+USER pysite
CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]
diff --git a/docker/app/alpine/3.7/Dockerfile b/docker/app/alpine/3.7/Dockerfile
index 524d0bfa..ece51045 100644
--- a/docker/app/alpine/3.7/Dockerfile
+++ b/docker/app/alpine/3.7/Dockerfile
@@ -2,6 +2,11 @@ FROM python:3.7-alpine
ARG EXTRAS=deploy
+RUN adduser \
+ --disabled-login \
+ --no-create-home \
+ pysite
+
RUN apk add --no-cache --virtual build \
gcc \
linux-headers \
@@ -18,4 +23,5 @@ RUN apk del --purge build
COPY . .
+USER pysite
CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]
diff --git a/docker/app/stretch/3.6/Dockerfile b/docker/app/stretch/3.6/Dockerfile
index 07911778..365ea451 100644
--- a/docker/app/stretch/3.6/Dockerfile
+++ b/docker/app/stretch/3.6/Dockerfile
@@ -2,6 +2,11 @@ FROM python:3.6-stretch
ARG EXTRAS=deploy
+RUN adduser \
+ --disabled-login \
+ --no-create-home \
+ pysite
+
RUN apt-get update -y \
&& \
apt-get install --no-install-recommends -y \
@@ -23,4 +28,5 @@ RUN apt-get purge -y \
libc-dev \
libpq-dev
+USER pysite
CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]
diff --git a/docker/app/stretch/3.7/Dockerfile b/docker/app/stretch/3.7/Dockerfile
index 35ed5cfd..f0069716 100644
--- a/docker/app/stretch/3.7/Dockerfile
+++ b/docker/app/stretch/3.7/Dockerfile
@@ -2,6 +2,11 @@ FROM python:3.7-stretch
ARG EXTRAS=deploy
+RUN adduser \
+ --disabled-login \
+ --no-create-home \
+ pysite
+
RUN apt-get update -y \
&& \
apt-get install --no-install-recommends -y \
@@ -23,4 +28,5 @@ RUN apt-get purge -y \
libc-dev \
libpq-dev
+USER pysite
CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]