From d5cfe3bc76efccd491dcf9b635b3fffa794225ff Mon Sep 17 00:00:00 2001 From: will Farrell Date: Tue, 14 Nov 2017 14:04:30 -0700 Subject: [PATCH] #6 Added `adduser` to the build script --- Dockerfile | 5 +++-- test => test_logging | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) rename test => test_logging (88%) diff --git a/Dockerfile b/Dockerfile index f6de2be..aa574b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM library/docker:stable ENV HOME_DIR=/opt/crontab RUN apk add --no-cache --virtual .run-deps bash jq \ - && mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects + && mkdir -p ${HOME_DIR}/jobs ${HOME_DIR}/projects \ + && adduser -S docker -D COPY docker-entrypoint / ENTRYPOINT ["/docker-entrypoint"] @@ -10,4 +11,4 @@ ENTRYPOINT ["/docker-entrypoint"] HEALTHCHECK --interval=5s --timeout=3s \ CMD ps aux | grep '[c]rond' || exit 1 -CMD ["crond","-f"] \ No newline at end of file +CMD ["crond","-f"] diff --git a/test b/test_logging similarity index 88% rename from test rename to test_logging index 04d19c9..97d5645 100755 --- a/test +++ b/test_logging @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -e +# This file is for testing the logging of docker output #8 + LOG_FILE=./jobs.log touch ${LOG_FILE} UUID="xxxxxxxxxxxxxxxxx"