Skip to content

Commit 5972e34

Browse files
clay-lakerenovate[bot]zhijie-yang
authored
feat(dotnet 8.0): add shadow file to chiseled rootfs (#779)
* feat: add shadow file to chiseled rootfs * chore(deps): update ubuntu.azurecr.io/ubuntu:24.04 docker digest to 5dcf95d (#787) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update hadolint/hadolint-action action to v3.3.0 (#783) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: lock root accoun via passwd file --------- Signed-off-by: zhijie-yang <zhijie.yang@canonical.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: zhijie-yang <zhijie.yang@canonical.com>
1 parent c65360f commit 5972e34

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dotnet-aspnet/Dockerfile.24.04

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN mkdir /rootfs \
2424
aspnetcore-runtime-8.0_libs
2525
RUN install -d -m 0755 -o "$UID" -g "$GID" "/rootfs/home/$USER" \
2626
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
27-
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
27+
&& echo -e "root:!:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" > /rootfs/etc/passwd
2828

2929
FROM scratch AS sbom-prep
3030
COPY --from=builder /rootfs /

dotnet-deps/Dockerfile.24.04

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN chmod +x /usr/bin/chisel-wrapper
1818
RUN mkdir -p /rootfs/etc \
1919
&& install -d -m 0755 -o "$UID" -g "$GID" "/rootfs/home/$USER" \
2020
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
21-
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
21+
&& echo -e "root:!:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" > /rootfs/etc/passwd
2222

2323
RUN chisel-wrapper --generate-dpkg-status /status -- --release "ubuntu-$UBUNTU_RELEASE" --root /rootfs \
2424
base-files_base \

dotnet-runtime/Dockerfile.24.04

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN mkdir /rootfs \
2424
dotnet-runtime-8.0_libs
2525
RUN install -d -m 0755 -o "$UID" -g "$GID" "/rootfs/home/$USER" \
2626
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
27-
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
27+
&& echo -e "root:!:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" > /rootfs/etc/passwd
2828

2929
FROM scratch AS sbom-prep
3030
COPY --from=builder /rootfs /

0 commit comments

Comments
 (0)