From 52befda4d8833d4e482588f4bf94b95c9a4c4ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Wed, 2 Mar 2022 02:39:19 +0100 Subject: [PATCH] user creation --- .drone.yml | 1 + Dockerfile | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 80e60ab..1ca1490 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,7 @@ --- kind: pipeline name: default +type: docker steps: - name: docker diff --git a/Dockerfile b/Dockerfile index 93e1af8..ec58d2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,22 +61,20 @@ RUN set -ex; \ apk del --purge .build-deps; \ rm -rf "${USER}/.cargo"; -RUN set -ex; \ - \ - # create non-root user - adduser -D -u 1368 duplicity; \ - mkdir -p /home/duplicity/.cache/duplicity; \ - mkdir -p /home/duplicity/.gnupg; \ - chmod -R go+rwx /home/duplicity/; +# create non-root user +RUN adduser -D -u 1368 duplicity; USER duplicity -VOLUME [ "/home/duplicity/.cache/duplicity" ] - -# confirm this is working RUN set -ex; \ \ - duplicity --version + mkdir -p "${HOME}/.cache/duplicity"; \ + mkdir -pm 600 "${HOME}/.gnupg"; + +VOLUME [ "/home/duplicity/.cache/duplicity" ] + +# confirm duplicity is working +RUN duplicity --version ENV \ #################