diff --git a/apiserver/Dockerfile b/apiserver/Dockerfile index 6b42309f150..e860f09d6e0 100644 --- a/apiserver/Dockerfile +++ b/apiserver/Dockerfile @@ -1,4 +1,4 @@ -FROM scratch as source +FROM scratch AS source ARG BIN_DIR ARG TARGETARCH diff --git a/app-policy/Dockerfile.amd64 b/app-policy/Dockerfile.amd64 index b5ca5022a66..81dc6c39235 100644 --- a/app-policy/Dockerfile.amd64 +++ b/app-policy/Dockerfile.amd64 @@ -15,7 +15,7 @@ ARG GIT_VERSION=unknown ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi RUN mkdir -p /tmp/dikastes RUN chmod 0777 /tmp/dikastes diff --git a/calicoctl/Dockerfile.amd64 b/calicoctl/Dockerfile.amd64 index 94e4eefc20a..741a6d77ace 100644 --- a/calicoctl/Dockerfile.amd64 +++ b/calicoctl/Dockerfile.amd64 @@ -14,7 +14,7 @@ ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi RUN mkdir /licenses COPY LICENSE /licenses diff --git a/calicoctl/Dockerfile.arm64 b/calicoctl/Dockerfile.arm64 index 60cdf9d91e9..d6b8ef59843 100644 --- a/calicoctl/Dockerfile.arm64 +++ b/calicoctl/Dockerfile.arm64 @@ -14,9 +14,9 @@ ARG QEMU_IMAGE=calico/go-build:v0.55 ARG UBI_IMAGE -FROM ${QEMU_IMAGE} as qemu +FROM ${QEMU_IMAGE} AS qemu -FROM --platform=linux/arm64 ${UBI_IMAGE} as ubi +FROM --platform=linux/arm64 ${UBI_IMAGE} AS ubi # Enable non-native builds of this image on an amd64 hosts. # This must be the first RUN command in this file! diff --git a/calicoctl/Dockerfile.armv7 b/calicoctl/Dockerfile.armv7 index dd3932a114b..bec6c7e6e45 100644 --- a/calicoctl/Dockerfile.armv7 +++ b/calicoctl/Dockerfile.armv7 @@ -1,5 +1,5 @@ ARG QEMU_IMAGE -FROM --platform=linux/arm/v7 ${QEMU_IMAGE} as qemu +FROM --platform=linux/arm/v7 ${QEMU_IMAGE} AS qemu FROM arm32v7/alpine:3.12 # Enable non-native builds of this image on an amd64 hosts. diff --git a/calicoctl/Dockerfile.ppc64le b/calicoctl/Dockerfile.ppc64le index 7b3f4051a3f..77c275ed8a1 100644 --- a/calicoctl/Dockerfile.ppc64le +++ b/calicoctl/Dockerfile.ppc64le @@ -1,5 +1,5 @@ ARG QEMU_IMAGE -FROM ${QEMU_IMAGE} as qemu +FROM ${QEMU_IMAGE} AS qemu FROM ppc64le/alpine:3.10 # Enable non-native builds of this image on an amd64 hosts. diff --git a/calicoctl/Dockerfile.s390x b/calicoctl/Dockerfile.s390x index c4b62440d39..f0e3f2ff389 100644 --- a/calicoctl/Dockerfile.s390x +++ b/calicoctl/Dockerfile.s390x @@ -1,7 +1,7 @@ ARG QEMU_IMAGE # Copying qemu binary files from amd64 container. # latest `go-build` containers got no candidate for `s390x` architecture. -FROM --platform=linux/amd64 ${QEMU_IMAGE} as qemu +FROM --platform=linux/amd64 ${QEMU_IMAGE} AS qemu FROM s390x/alpine:3.10 # Enable non-native builds of this image on an amd64 hosts. diff --git a/cni-plugin/Dockerfile.amd64 b/cni-plugin/Dockerfile.amd64 index 41a5ff23d20..9ea54e8e583 100644 --- a/cni-plugin/Dockerfile.amd64 +++ b/cni-plugin/Dockerfile.amd64 @@ -14,7 +14,7 @@ ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi FROM scratch diff --git a/cni-plugin/Dockerfile.s390x b/cni-plugin/Dockerfile.s390x index 194fd751e98..724955d39d7 100644 --- a/cni-plugin/Dockerfile.s390x +++ b/cni-plugin/Dockerfile.s390x @@ -1,6 +1,6 @@ ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi LABEL maintainer "LoZ Open Source Ecosystem (https://www.ibm.com/developerworks/community/groups/community/lozopensource)" diff --git a/felix/docker-image/Dockerfile.amd64 b/felix/docker-image/Dockerfile.amd64 index 4e853b82cda..29f4e9e5551 100644 --- a/felix/docker-image/Dockerfile.amd64 +++ b/felix/docker-image/Dockerfile.amd64 @@ -17,12 +17,12 @@ # This ensures that testing of Felix in this repository is done in the same # userspace environment as it will be deployed in calico/node. -FROM ubuntu:focal as wgtool +FROM ubuntu:focal AS wgtool RUN apt-get update && \ apt-get install --no-install-recommends wireguard-tools -y -FROM calico/bpftool:v7.4.0 as bpftool +FROM calico/bpftool:v7.4.0 AS bpftool FROM debian:10-slim LABEL maintainer="Shaun Crampton " diff --git a/felix/docker-image/Dockerfile.s390x b/felix/docker-image/Dockerfile.s390x index 078e6d64de6..57c38631b62 100644 --- a/felix/docker-image/Dockerfile.s390x +++ b/felix/docker-image/Dockerfile.s390x @@ -1,14 +1,14 @@ ARG QEMU_IMAGE -FROM ${QEMU_IMAGE} as qemu -FROM s390x/ubuntu:focal as wgtool +FROM ${QEMU_IMAGE} AS qemu +FROM s390x/ubuntu:focal AS wgtool # Enable non-native builds of this image on an amd64 hosts. # This must be the first RUN command in this file! COPY --from=qemu /usr/bin/qemu-*-static /usr/bin/ RUN apt-get update && \ apt-get install --no-install-recommends wireguard-tools -y -FROM calico/bpftool:v5.3-s390x as bpftool +FROM calico/bpftool:v5.3-s390x AS bpftool FROM s390x/debian:10-slim LABEL maintainer="Shaun Crampton " diff --git a/kube-controllers/Dockerfile.amd64 b/kube-controllers/Dockerfile.amd64 index 37a31b7623b..c2c78126ebc 100644 --- a/kube-controllers/Dockerfile.amd64 +++ b/kube-controllers/Dockerfile.amd64 @@ -15,7 +15,7 @@ ARG GIT_VERSION=unknown ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi # Add in top-level license file RUN mkdir /licenses diff --git a/kube-controllers/Dockerfile.arm64 b/kube-controllers/Dockerfile.arm64 index ed034af7ce2..ebd74e4fbbc 100644 --- a/kube-controllers/Dockerfile.arm64 +++ b/kube-controllers/Dockerfile.arm64 @@ -15,9 +15,9 @@ ARG QEMU_IMAGE ARG UBI_IMAGE -FROM ${QEMU_IMAGE} as qemu +FROM ${QEMU_IMAGE} AS qemu -FROM --platform=linux/arm64 ${UBI_IMAGE} as ubi +FROM --platform=linux/arm64 ${UBI_IMAGE} AS ubi # Enable non-native builds of this image on an amd64 hosts. # This must be the first RUN command in this file! diff --git a/kube-controllers/Dockerfile.s390x b/kube-controllers/Dockerfile.s390x index f60ad9ddf39..00e31c917fd 100644 --- a/kube-controllers/Dockerfile.s390x +++ b/kube-controllers/Dockerfile.s390x @@ -16,8 +16,8 @@ ARG GIT_VERSION=unknown ARG UBI_IMAGE ARG QEMU_IMAGE -FROM ${QEMU_IMAGE} as qemu -FROM ${UBI_IMAGE} as ubi +FROM ${QEMU_IMAGE} AS qemu +FROM ${UBI_IMAGE} AS ubi COPY --from=qemu /usr/bin/qemu-*-static /usr/bin/ diff --git a/kube-controllers/docker-images/flannel-migration/Dockerfile.amd64 b/kube-controllers/docker-images/flannel-migration/Dockerfile.amd64 index 97373b3c859..08f6c39fc30 100644 --- a/kube-controllers/docker-images/flannel-migration/Dockerfile.amd64 +++ b/kube-controllers/docker-images/flannel-migration/Dockerfile.amd64 @@ -15,7 +15,7 @@ ARG GIT_VERSION=unknown ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi # Add in top-level license file RUN mkdir /licenses diff --git a/networking-calico/Dockerfile b/networking-calico/Dockerfile index ba774c45c65..61da6e8eef9 100644 --- a/networking-calico/Dockerfile +++ b/networking-calico/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/coreos/etcd:v3.4.20 as etcd +FROM quay.io/coreos/etcd:v3.4.20 AS etcd FROM python:3.8 diff --git a/node/Dockerfile.amd64 b/node/Dockerfile.amd64 index 8e57636dd79..b3aebf47ff9 100644 --- a/node/Dockerfile.amd64 +++ b/node/Dockerfile.amd64 @@ -19,13 +19,13 @@ ARG RUNIT_VER=2.1.2 ARG BIRD_IMAGE=calico/bird:latest ARG UBI_IMAGE -FROM calico/bpftool:v7.4.0 as bpftool -FROM ${BIRD_IMAGE} as bird +FROM calico/bpftool:v7.4.0 AS bpftool +FROM ${BIRD_IMAGE} AS bird # Use this build stage to build iptables rpm and runit binaries. # We need to rebuild the iptables rpm because the prepackaged rpm does not have legacy iptables binaries. # We need to build runit because there aren't any rpms for it in AlmaLinux or ubi repositories. -FROM almalinux:8 as almalinux +FROM almalinux:8 AS almalinux ARG IPTABLES_VER ARG LIBNFTNL_VER @@ -81,7 +81,7 @@ RUN wget -P /tmp https://ftp.debian.org/debian/pool/main/r/runit/runit_${RUNIT_V cd /tmp/admin/runit-${RUNIT_VER}/ && \ package/install -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi ARG GIT_VERSION ARG IPTABLES_VER diff --git a/node/Dockerfile.arm64 b/node/Dockerfile.arm64 index a69e2234a29..d3cbe2cbc0a 100644 --- a/node/Dockerfile.arm64 +++ b/node/Dockerfile.arm64 @@ -20,14 +20,14 @@ ARG QEMU_IMAGE ARG BIRD_IMAGE=calico/bird:latest ARG UBI_IMAGE -FROM calico/bpftool:v7.4.0 as bpftool -FROM ${QEMU_IMAGE} as qemu -FROM ${BIRD_IMAGE} as bird +FROM calico/bpftool:v7.4.0 AS bpftool +FROM ${QEMU_IMAGE} AS qemu +FROM ${BIRD_IMAGE} AS bird # Use this build stage to build iptables rpm and runit binaries. # We need to rebuild the iptables rpm because the prepackaged rpm does not have legacy iptables binaries. # We need to build runit because there aren't any rpms for it in AlmaLinux or ubi repositories. -FROM almalinux:8 as almalinux +FROM almalinux:8 AS almalinux # Enable non-native builds of this image on an amd64 hosts. # This must be the first RUN command in this file! @@ -94,7 +94,7 @@ RUN wget -P /tmp https://ftp.debian.org/debian/pool/main/r/runit/runit_${RUNIT_V sed -i "s/utmpset/\/tmp\/admin\/runit-2.1.2\/compile\/utmpset/" src/utmpset.dist && \ package/install -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi ARG GIT_VERSION ARG IPTABLES_VER diff --git a/node/Dockerfile.armv7 b/node/Dockerfile.armv7 index 88c0ff5aca7..35d15173f0b 100644 --- a/node/Dockerfile.armv7 +++ b/node/Dockerfile.armv7 @@ -14,10 +14,10 @@ ARG QEMU_IMAGE=calico/go-build:latest ARG BIRD_IMAGE=calico/bird:latest -FROM ${QEMU_IMAGE} as qemu -FROM ${BIRD_IMAGE} as bird +FROM ${QEMU_IMAGE} AS qemu +FROM ${BIRD_IMAGE} AS bird -FROM arm32v7/alpine:3.18 as base +FROM arm32v7/alpine:3.18 AS base MAINTAINER Marc Crébassa ARG ARCH=armv7 diff --git a/node/Dockerfile.ppc64le b/node/Dockerfile.ppc64le index d185e640b64..2f17ed42ee5 100644 --- a/node/Dockerfile.ppc64le +++ b/node/Dockerfile.ppc64le @@ -15,10 +15,10 @@ ARG QEMU_IMAGE=calico/go-build:latest ARG BIRD_IMAGE=calico/bird:latest -FROM ${QEMU_IMAGE} as qemu -FROM ${BIRD_IMAGE} as bird +FROM ${QEMU_IMAGE} AS qemu +FROM ${BIRD_IMAGE} AS bird -FROM calico/bpftool:v7.4.0 as bpftool +FROM calico/bpftool:v7.4.0 AS bpftool FROM ppc64le/alpine:3.18 MAINTAINER David Wilder diff --git a/node/Dockerfile.s390x b/node/Dockerfile.s390x index 4b0b4b59c6c..a656a83eb12 100644 --- a/node/Dockerfile.s390x +++ b/node/Dockerfile.s390x @@ -15,12 +15,12 @@ ARG QEMU_IMAGE=calico/go-build:latest ARG BIRD_IMAGE -FROM ${QEMU_IMAGE} as qemu -FROM ${BIRD_IMAGE} as bird +FROM ${QEMU_IMAGE} AS qemu +FROM ${BIRD_IMAGE} AS bird -FROM calico/bpftool:v7.4.0 as bpftool +FROM calico/bpftool:v7.4.0 AS bpftool -FROM s390x/alpine:3.18 as base +FROM s390x/alpine:3.18 AS base # Enable non-native builds of this image on an amd64 hosts. # This must be the first RUN command in this file! COPY --from=qemu /usr/bin/qemu-*-static /usr/bin/ diff --git a/pod2daemon/Dockerfile.amd64 b/pod2daemon/Dockerfile.amd64 index e74f28b3de7..e7d49195d78 100644 --- a/pod2daemon/Dockerfile.amd64 +++ b/pod2daemon/Dockerfile.amd64 @@ -14,7 +14,7 @@ ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi ADD flexvol/docker/clean.sh /usr/local/bin/clean.sh ADD flexvol/docker/flexvol.sh /usr/local/bin/flexvol.sh diff --git a/pod2daemon/csidriver/Dockerfile.amd64 b/pod2daemon/csidriver/Dockerfile.amd64 index bfe1b53a523..5cdcf09ad31 100644 --- a/pod2daemon/csidriver/Dockerfile.amd64 +++ b/pod2daemon/csidriver/Dockerfile.amd64 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi FROM scratch SHELL ["/bin/sh", "-c"] diff --git a/pod2daemon/node-driver-registrar-docker/Dockerfile.amd64 b/pod2daemon/node-driver-registrar-docker/Dockerfile.amd64 index c6380d1974b..6e1866c1306 100644 --- a/pod2daemon/node-driver-registrar-docker/Dockerfile.amd64 +++ b/pod2daemon/node-driver-registrar-docker/Dockerfile.amd64 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi FROM scratch SHELL ["/bin/sh", "-c"] diff --git a/typha/docker-image/Dockerfile.amd64 b/typha/docker-image/Dockerfile.amd64 index 4b701354832..f4744167868 100644 --- a/typha/docker-image/Dockerfile.amd64 +++ b/typha/docker-image/Dockerfile.amd64 @@ -15,7 +15,7 @@ ARG GIT_VERSION=unknown ARG UBI_IMAGE -FROM ${UBI_IMAGE} as ubi +FROM ${UBI_IMAGE} AS ubi # Since our binary isn't designed to run as PID 1, run it via the tini init daemon. ENV TINI_VERSION v0.18.0 diff --git a/typha/docker-image/Dockerfile.arm64 b/typha/docker-image/Dockerfile.arm64 index 36fe974e5c1..10d80246220 100644 --- a/typha/docker-image/Dockerfile.arm64 +++ b/typha/docker-image/Dockerfile.arm64 @@ -13,9 +13,9 @@ # limitations under the License. ARG QEMU_IMAGE=calico/go-build:latest -FROM ${QEMU_IMAGE} as qemu +FROM ${QEMU_IMAGE} AS qemu -FROM arm64v8/debian:9.8-slim as base +FROM arm64v8/debian:9.8-slim AS base MAINTAINER Shaun Crampton # Enable non-native builds of this image on an amd64 hosts. diff --git a/typha/docker-image/Dockerfile.ppc64le b/typha/docker-image/Dockerfile.ppc64le index befdf6257ec..5f58da1c0f5 100644 --- a/typha/docker-image/Dockerfile.ppc64le +++ b/typha/docker-image/Dockerfile.ppc64le @@ -13,9 +13,9 @@ # limitations under the License. ARG QEMU_IMAGE=calico/go-build:latest -FROM ${QEMU_IMAGE} as qemu +FROM ${QEMU_IMAGE} AS qemu -FROM ppc64le/debian:9.8-slim as base +FROM ppc64le/debian:9.8-slim AS base MAINTAINER Shaun Crampton # Enable non-native builds of this image on an amd64 hosts. diff --git a/typha/docker-image/Dockerfile.s390x b/typha/docker-image/Dockerfile.s390x index 2ff02ae6aad..7cef1c55c6b 100644 --- a/typha/docker-image/Dockerfile.s390x +++ b/typha/docker-image/Dockerfile.s390x @@ -14,8 +14,8 @@ ARG QEMU_IMAGE=calico/go-build:latest -FROM ${QEMU_IMAGE} as qemu -FROM s390x/debian:9.8-slim as base +FROM ${QEMU_IMAGE} AS qemu +FROM s390x/debian:9.8-slim AS base MAINTAINER LoZ Open Source Ecosystem (https://www.ibm.com/developerworks/community/groups/community/lozopensource) # Enable non-native builds of this image on an amd64 hosts.