From 680675529ae8b51657d52bc85c55c4ebd9418d24 Mon Sep 17 00:00:00 2001 From: ford-at-aws Date: Tue, 31 Oct 2023 10:31:33 -0400 Subject: [PATCH 1/3] fixes for Dockerfile --- php/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/php/Dockerfile b/php/Dockerfile index a5bef8e3cf8..c8dca27535c 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -15,8 +15,9 @@ WORKDIR /php RUN find . -name "composer.json" -not -path "*vendor*" -exec bash -c "dirname {} | xargs -I % composer install --working-dir=%" \; # Set non-root user -RUN useradd -m automation && \ - chown -R automation:automation /php/ +RUN addgroup -S automation +RUN adduser -S -G automation automation +RUN chown -R automation:automation /php/ USER automation:automation CMD ["./php/testing", "--integ"] \ No newline at end of file From 302acb4bcf110a2031eb3df2d2916803339a273c Mon Sep 17 00:00:00 2001 From: ford-at-aws Date: Tue, 31 Oct 2023 10:35:22 -0400 Subject: [PATCH 2/3] fixes for Dockerfile --- php/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/php/Dockerfile b/php/Dockerfile index c8dca27535c..ad095f041ad 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -15,9 +15,10 @@ WORKDIR /php RUN find . -name "composer.json" -not -path "*vendor*" -exec bash -c "dirname {} | xargs -I % composer install --working-dir=%" \; # Set non-root user -RUN addgroup -S automation -RUN adduser -S -G automation automation -RUN chown -R automation:automation /php/ +RUN addgroup -S automation \ + adduser -S -G automation automation \ + chown -R automation:automation /php/ + USER automation:automation CMD ["./php/testing", "--integ"] \ No newline at end of file From cfe0be75a2ebc4e579f21209e0cec800eadf2b6f Mon Sep 17 00:00:00 2001 From: ford-at-aws Date: Tue, 31 Oct 2023 10:39:31 -0400 Subject: [PATCH 3/3] fixes --- php/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php/Dockerfile b/php/Dockerfile index ad095f041ad..9b79e06c1bb 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -14,9 +14,9 @@ WORKDIR /php # Perform build steps RUN find . -name "composer.json" -not -path "*vendor*" -exec bash -c "dirname {} | xargs -I % composer install --working-dir=%" \; -# Set non-root user -RUN addgroup -S automation \ - adduser -S -G automation automation \ +# Set non-root user w/ ownership of /php +RUN addgroup -S automation && \ + adduser -S -G automation automation && \ chown -R automation:automation /php/ USER automation:automation