From d319a77a9ab1d9f77b1cfb6edeea427091221dfc Mon Sep 17 00:00:00 2001 From: marcsello Date: Fri, 27 Nov 2020 06:13:13 +0100 Subject: [PATCH] Created magic Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1117341 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM registry.kmlabz.com/unstablevortex/caff-previewer:latest AS caffsrc + +FROM python:3.8-alpine +COPY --from=caffsrc /usr/local/bin/caff_previewer /usr/local/bin/caff_previewer + +WORKDIR /app + +ARG RELEASE_ID +ENV RELEASE_ID ${RELEASE_ID:-""} + +COPY requirements.txt ./ + +RUN apk update && apk add imagemagick && pip3 install --no-cache-dir -r requirements.txt && rm -f requirements.txt && adduser -D -H -s /bin/false -u 1000 caffsvc + +COPY ./caff_previewer_wrapper . + +EXPOSE 8080 + +USER 1000 +ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:8080", "--workers", "4", "--threads", "2", "app:app"] \ No newline at end of file