Skip to content

Commit 03707f3

Browse files
kimsondrupbuehler
andauthored
fix: Dockerfile do chown operation as part of COPY (#952)
One less layer in the container image Co-authored-by: Christoph Bühler <[email protected]>
1 parent 1e427a1 commit 03707f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/KubeOps.Cli/Generators/DockerfileGenerator.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ COPY ./ ./
2525
RUN addgroup k8s-operator && useradd -G k8s-operator operator-user
2626
2727
WORKDIR /operator
28-
COPY --from=build /operator/out/ ./
29-
RUN chown operator-user:k8s-operator -R .
28+
COPY --chown=operator-user:k8s-operator --from=build /operator/out/ ./
3029
3130
USER operator-user
3231

0 commit comments

Comments
 (0)