Skip to content

Commit 9ff4cee

Browse files
authored
chore: fix dockerfile warnings reported during docker build (#1416)
- Use uppercase keyword in dockerfile as per convention - Split long RUN instruction into multiple lines for clarity - Use exec form for CMD instruction as done in ENTRYPOINT Signed-off-by: Rohan Kumar <[email protected]>
1 parent d2a9d0c commit 9ff4cee

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

build/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515

1616
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9/go-toolset
17-
FROM registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 as builder
17+
FROM registry.access.redhat.com/ubi9/go-toolset:9.5-1739267472 AS builder
1818
ENV GOPATH=/go/
1919
USER root
2020
WORKDIR /devworkspace-operator
@@ -35,7 +35,12 @@ RUN make compile-webhook-server
3535

3636
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi9-minimal
3737
FROM registry.access.redhat.com/ubi9-minimal:9.5-1739420147
38-
RUN microdnf -y update && microdnf clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages"
38+
RUN microdnf -y update && \
39+
microdnf clean all && \
40+
rm -rf /var/cache/yum && \
41+
echo "Installed Packages" && \
42+
rpm -qa | sort -V && \
43+
echo "End Of Installed Packages"
3944
WORKDIR /
4045
COPY --from=builder /devworkspace-operator/_output/bin/devworkspace-controller /usr/local/bin/devworkspace-controller
4146
COPY --from=builder /devworkspace-operator/_output/bin/webhook-server /usr/local/bin/webhook-server
@@ -49,6 +54,6 @@ RUN /usr/local/bin/user_setup
4954
USER ${USER_UID}
5055

5156
ENTRYPOINT ["/usr/local/bin/entrypoint"]
52-
CMD /usr/local/bin/devworkspace-controller
57+
CMD ["/usr/local/bin/devworkspace-controller"]
5358

5459
# append Brew metadata here

0 commit comments

Comments
 (0)