From ad50111d67cbea824405a78c81050d2761cd63d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=ADghearn=C3=A1n=20Carroll?= Date: Thu, 30 Sep 2021 15:57:54 +0100 Subject: [PATCH] Enhancement: Better docker container layers (#51) * move adding binaries in docker releaser to improve image layers * add binary last as it is more likely to change than the migrations --- Dockerfile.releaser | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile.releaser b/Dockerfile.releaser index a83fd5e8..884b41a3 100644 --- a/Dockerfile.releaser +++ b/Dockerfile.releaser @@ -14,8 +14,6 @@ RUN adduser \ FROM bitnami/minideb:buster -ADD payd-server /bin -ADD data/sqlite/migrations/ /migrations COPY --from=builder /etc/passwd /etc/passwd COPY --from=builder /etc/group /etc/group COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt @@ -23,6 +21,9 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifi RUN mkdir /paydb && chown -R appuser:appuser /paydb VOLUME /paydb +ADD data/sqlite/migrations/ /migrations +ADD payd-server /bin + USER appuser:appuser EXPOSE 8443