Compare commits
1 Commits
0bbf2855fe
...
de14f00945
Author | SHA256 | Date | |
---|---|---|---|
|
de14f00945 |
@@ -10,6 +10,15 @@ COPY --from=micro / /installroot/
|
||||
RUN sed -i -e 's%^# rpm.install.excludedocs = no.*%rpm.install.excludedocs = yes%g' /etc/zypp/zypp.conf
|
||||
RUN zypper --installroot /installroot --non-interactive install --no-recommends python311-suse-edge-components-versions
|
||||
|
||||
# https://opensource.suse.com/bci-docs/guides/adding-users/
|
||||
ARG USERNAME=suse
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Create the user
|
||||
RUN groupadd --gid $USER_GID $USERNAME \
|
||||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
|
||||
|
||||
# build actual image
|
||||
FROM micro AS final
|
||||
|
||||
@@ -32,13 +41,11 @@ LABEL com.suse.release-stage="released"
|
||||
|
||||
COPY --from=base /installroot /
|
||||
|
||||
ARG USERNAME=suse
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Create the user
|
||||
RUN groupadd --gid $USER_GID $USERNAME \
|
||||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
|
||||
# https://opensource.suse.com/bci-docs/guides/adding-users/
|
||||
COPY --from=base /etc/passwd /etc/passwd
|
||||
COPY --from=base /etc/group /etc/group
|
||||
COPY --from=base /etc/shadow /etc/shadow
|
||||
COPY --from=base /home/$USERNAME /home/$USERNAME
|
||||
|
||||
USER ${USERNAME}
|
||||
|
||||
|
Reference in New Issue
Block a user