Skip to content

Commit

Permalink
Fix redundant or incomplete declarations
Browse files Browse the repository at this point in the history
This fixes a few buildx warnings:
* BASE_BRANCH needs a default value
* specifying ${TARGETPLATFORM} is redundant
* entrypoints should be specified as JSON arrays (this doesn't change
  anything in practice for Submariner, since the entrypoints are
  shell scripts which correctly set up signal handling)

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed Dec 4, 2024
1 parent 41b394d commit 3fc491c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package/Dockerfile.submariner-gateway
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_BRANCH
ARG BASE_BRANCH=devel
ARG FEDORA_VERSION=41
ARG SOURCE=/go/src/github.com/submariner-io/submariner

Expand All @@ -25,7 +25,7 @@ RUN /dnf_install -a ${TARGETPLATFORM} -v ${FEDORA_VERSION} -r /output/gateway \
glibc bash glibc-minimal-langpack coreutils-single \
libcurl-minimal iproute libreswan kmod

FROM --platform=${TARGETPLATFORM} scratch
FROM scratch
ARG SOURCE
ARG TARGETPLATFORM

Expand All @@ -35,4 +35,4 @@ COPY --from=base /output/gateway /

COPY --from=builder ${SOURCE}/package/submariner.sh ${SOURCE}/package/pluto ${SOURCE}/bin/${TARGETPLATFORM}/submariner-gateway /usr/local/bin/

ENTRYPOINT submariner.sh
ENTRYPOINT ["submariner.sh"]
6 changes: 3 additions & 3 deletions package/Dockerfile.submariner-globalnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_BRANCH
ARG BASE_BRANCH=devel
ARG FEDORA_VERSION=41
ARG SOURCE=/go/src/github.com/submariner-io/submariner

Expand All @@ -22,7 +22,7 @@ RUN /dnf_install -a ${TARGETPLATFORM} -v ${FEDORA_VERSION} -r /output/globalnet
glibc bash glibc-minimal-langpack coreutils-single \
iproute iptables-legacy iptables-nft ipset grep

FROM --platform=${TARGETPLATFORM} scratch
FROM scratch
ARG SOURCE
ARG TARGETPLATFORM

Expand All @@ -38,4 +38,4 @@ COPY --from=builder ${SOURCE}/package/iptables-wrapper-installer.sh /usr/sbin/
# The sanity checks can fail when building foreign arch images; we know we meet the requirements
RUN /usr/sbin/iptables-wrapper-installer.sh --no-sanity-check

ENTRYPOINT submariner-globalnet.sh
ENTRYPOINT ["submariner-globalnet.sh"]
6 changes: 3 additions & 3 deletions package/Dockerfile.submariner-route-agent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_BRANCH
ARG BASE_BRANCH=devel
ARG FEDORA_VERSION=41
ARG SOURCE=/go/src/github.com/submariner-io/submariner

Expand All @@ -22,7 +22,7 @@ RUN /dnf_install -a ${TARGETPLATFORM} -v ${FEDORA_VERSION} -r /output/route-agen
glibc bash glibc-minimal-langpack coreutils-single \
iproute iptables-legacy iptables-nft ipset openvswitch procps-ng grep

FROM --platform=${TARGETPLATFORM} scratch
FROM scratch
ARG SOURCE
ARG TARGETPLATFORM

Expand All @@ -38,4 +38,4 @@ COPY --from=builder ${SOURCE}/package/iptables-wrapper-installer.sh /usr/sbin/
# The sanity checks can fail when building foreign arch images; we know we meet the requirements
RUN /usr/sbin/iptables-wrapper-installer.sh --no-sanity-check

ENTRYPOINT submariner-route-agent.sh
ENTRYPOINT ["submariner-route-agent.sh"]

0 comments on commit 3fc491c

Please sign in to comment.