forked from klakegg/docker-hugo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default_nonroot_user.df (#141)
- Loading branch information
Showing
14 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
FROM main as ext | ||
|
||
RUN addgroup --gid 1000 hugo \ | ||
&& adduser --uid 1000 --gid 1000 --disabled-password --gecos "" hugo \ | ||
# Create a custom user with UID 1234 and GID 1234 | ||
RUN getent group hugo 2>&1 > /dev/null || groupadd -g 1234 hugo && \ | ||
getent passwd hugo 2>&1 > /dev/null || useradd -m -u 1234 -g hugo hugo \ | ||
&& chown -R hugo /src \ | ||
&& chown -R hugo /target | ||
|
||
USER hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RUN getent group hugo 2>&1 > /dev/null || addgroup -g 1234 hugo \ | ||
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo \ | ||
&& chown -R hugo /src \ | ||
&& chown -R hugo /target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
FROM ext-alpine AS main | ||
|
||
USER root | ||
|
||
RUN apk -U upgrade && apk --no-cache add asciidoctor \ | ||
&& gem install coderay --no-document \ | ||
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf | ||
|
||
|
||
IMPORT ../_imports/default_nonroot_user_alpine.df | ||
|
||
IMPORT ../_imports/ci.df | ||
|
||
IMPORT ../_imports/onbuild.df | ||
|
||
FROM main | ||
|
||
|
||
FROM main | ||
USER hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
FROM alpine AS main | ||
|
||
USER root | ||
RUN apk -U upgrade && apk --no-cache add asciidoctor \ | ||
&& gem install coderay asciidoctor-rouge --no-document \ | ||
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf | ||
|
||
|
||
IMPORT ../_imports/default_nonroot_user_alpine.df | ||
|
||
IMPORT ../_imports/ci.df | ||
|
||
IMPORT ../_imports/onbuild.df | ||
|
||
FROM main | ||
|
||
|
||
FROM main | ||
USER hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters