Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1879: fix LegacyKeyValueFormat warnings when build docker images #1880

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hack/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ RUN set -eux; \
; \
dnf clean all

ENV PATH /usr/local/go/bin:$PATH
ENV PATH=/usr/local/go/bin:$PATH

RUN set -eux; go version

ENV GOPATH /go
ENV PATH $GOPATH/bin:$PATH
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
WORKDIR $GOPATH
16 changes: 8 additions & 8 deletions src/cloud-api-adaptor/aws/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ARG ARCH=x86_64
ARG CAA_SRC=""
ARG CAA_SRC_REF=""

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}

RUN if [ -n "${CAA_SRC}" ]; then \
rm -rf cloud-api-adaptor && \
Expand All @@ -46,12 +46,12 @@ ARG INSTANCE_TYPE=t3.small
ARG IMAGE_NAME=peer-pod-ami
ARG VOL_SIZE

ENV AWS_REGION ${AWS_REGION}
ENV VPC_ID ${VPC_ID}
ENV SUBNET_ID ${SUBNET_ID}
ENV INSTANCE_TYPE ${INSTANCE_TYPE}
ENV IMAGE_NAME ${IMAGE_NAME}
ENV VOLUME_SIZE ${VOLUME_SIZE}
ENV AWS_REGION=${AWS_REGION}
ENV VPC_ID=${VPC_ID}
ENV SUBNET_ID=${SUBNET_ID}
ENV INSTANCE_TYPE=${INSTANCE_TYPE}
ENV IMAGE_NAME=${IMAGE_NAME}
ENV VOLUME_SIZE=${VOLUME_SIZE}

# Install AWS cli which will be used for default-vpc creation if required
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
Expand Down
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/azure/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ARG ARCH=x86_64
ARG CAA_SRC=""
ARG CAA_SRC_REF=""

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}

RUN if [ -n "${CAA_SRC}" ]; then \
rm -rf cloud-api-adaptor && \
Expand Down
14 changes: 7 additions & 7 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ ARG UEFI=false
# If not provided, uses system architecture
ARG ARCH

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV ARCH ${ARCH}
ENV UEFI ${UEFI}
ENV SE_BOOT ${SE_BOOT}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}
ENV ARCH=${ARCH}
ENV UEFI=${UEFI}
ENV SE_BOOT=${SE_BOOT}

# Defaults to Ubuntu Focal amd64 release image. These variables can be overriden as needed
ARG IMAGE_URL
ARG IMAGE_CHECKSUM

ENV IMAGE_URL ${IMAGE_URL}
ENV IMAGE_CHECKSUM ${IMAGE_CHECKSUM}
ENV IMAGE_URL=${IMAGE_URL}
ENV IMAGE_CHECKSUM=${IMAGE_CHECKSUM}

# Copy the binaries to podvm/files folder
COPY --from=podvm_binaries /podvm-binaries.tar.gz /src/cloud-api-adaptor/podvm/files/podvm-binaries.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-api-adaptor/podvm/Dockerfile.podvm.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ FROM scratch

ARG ARCH=s390x

ENV ARCH ${ARCH}
ENV ARCH=${ARCH}

COPY build/podvm-${ARCH}.qcow2 /
12 changes: 6 additions & 6 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ ARG ARCH=x86_64
ARG CAA_SRC=""
ARG CAA_SRC_REF=""

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV ARCH ${ARCH}
ENV UEFI ${UEFI}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}
ENV ARCH=${ARCH}
ENV UEFI=${UEFI}

ARG IMAGE_URL
ARG IMAGE_CHECKSUM

ENV IMAGE_URL ${IMAGE_URL}
ENV IMAGE_CHECKSUM ${IMAGE_CHECKSUM}
ENV IMAGE_URL=${IMAGE_URL}
ENV IMAGE_CHECKSUM=${IMAGE_CHECKSUM}

# workaround to ensure hashicorp packer is called instead
# of cracklib packer which is installed by default
Expand Down
18 changes: 9 additions & 9 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_binaries
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ ARG ARCH
#files/etc/kata-opa
ARG DEFAULT_AGENT_POLICY_FILE=allow-all.rego

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV GUEST_COMPONENTS_VERSION ${GUEST_COMPONENTS_VERSION}
ENV GUEST_COMPONENTS_REPO ${GUEST_COMPONENTS_REPO}
ENV ATTESTER ${ATTESTER}
ENV ARCH ${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE ${DEFAULT_AGENT_POLICY_FILE}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}
ENV GUEST_COMPONENTS_VERSION=${GUEST_COMPONENTS_VERSION}
ENV GUEST_COMPONENTS_REPO=${GUEST_COMPONENTS_REPO}
ENV ATTESTER=${ATTESTER}
ENV ARCH=${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE=${DEFAULT_AGENT_POLICY_FILE}

# Set these as they are required in the Makefile
ENV IMAGE_URL "none"
ENV IMAGE_CHECKSUM "none"
ENV IMAGE_URL="none"
ENV IMAGE_CHECKSUM="none"

COPY . /src

Expand Down
18 changes: 9 additions & 9 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_binaries.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ ARG ARCH
#files/etc/kata-opa
ARG DEFAULT_AGENT_POLICY_FILE=allow-all.rego

ENV CLOUD_PROVIDER ${CLOUD_PROVIDER}
ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV GUEST_COMPONENTS_VERSION ${GUEST_COMPONENTS_VERSION}
ENV GUEST_COMPONENTS_REPO ${GUEST_COMPONENTS_REPO}
ENV ATTESTER ${ATTESTER}
ENV ARCH ${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE ${DEFAULT_AGENT_POLICY_FILE}
ENV CLOUD_PROVIDER=${CLOUD_PROVIDER}
ENV PODVM_DISTRO=${PODVM_DISTRO}
ENV GUEST_COMPONENTS_VERSION=${GUEST_COMPONENTS_VERSION}
ENV GUEST_COMPONENTS_REPO=${GUEST_COMPONENTS_REPO}
ENV ATTESTER=${ATTESTER}
ENV ARCH=${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE=${DEFAULT_AGENT_POLICY_FILE}

# Set these as they are required in the Makefile
ENV IMAGE_URL "none"
ENV IMAGE_CHECKSUM "none"
ENV IMAGE_URL="none"
ENV IMAGE_CHECKSUM="none"

COPY . /src

Expand Down
8 changes: 4 additions & 4 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_binaries.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ ARG ARCH
#files/etc/kata-opa
ARG DEFAULT_AGENT_POLICY_FILE=allow-all.rego

ENV PODVM_DISTRO ${PODVM_DISTRO}
ENV ATTESTER ${ATTESTER}
ENV ARCH ${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE ${DEFAULT_AGENT_POLICY_FILE}
ENV PODVM_DISTRO=${PODVM_DISTRO}
ENV ATTESTER=${ATTESTER}
ENV ARCH=${ARCH}
ENV DEFAULT_AGENT_POLICY_FILE=${DEFAULT_AGENT_POLICY_FILE}

COPY . /src

Expand Down
18 changes: 9 additions & 9 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_builder
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ ARG YQ_VERSION="v4.35.1"
# s390x: YQ_CHECKSUM="sha256:4e6324d08630e7df733894a11830412a43703682d65a76f1fc925aac08268a45"
ARG YQ_CHECKSUM="sha256:bd695a6513f1196aeda17b174a15e9c351843fb1cef5f9be0af170f2dd744f08"
# Without setting ENV gh-action is failing to use the correct values
ENV GO_VERSION ${GO_VERSION}
ENV RUST_VERSION ${RUST_VERSION}
ENV PROTOC_VERSION ${PROTOC_VERSION}
ENV ARCH ${ARCH}
ENV YQ_ARCH ${YQ_ARCH}
ENV YQ_VERSION ${YQ_VERSION}
ENV GO_VERSION=${GO_VERSION}
ENV RUST_VERSION=${RUST_VERSION}
ENV PROTOC_VERSION=${PROTOC_VERSION}
ENV ARCH=${ARCH}
ENV YQ_ARCH=${YQ_ARCH}
ENV YQ_VERSION=${YQ_VERSION}

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
apt-get install --no-install-recommends -y build-essential cloud-image-utils curl git gnupg \
Expand All @@ -48,7 +48,7 @@ ADD https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${Y
RUN echo "${YQ_CHECKSUM#sha256:} /usr/local/bin/yq" | sha256sum -c
RUN chmod a+x /usr/local/bin/yq

ENV PATH "/root/.cargo/bin:/usr/local/go/bin:$PATH"
ENV PATH="/root/.cargo/bin:/usr/local/go/bin:$PATH"

ADD https://sh.rustup.rs rustup
RUN chmod a+x rustup && ./rustup -y --default-toolchain ${RUST_VERSION} \
Expand All @@ -59,4 +59,4 @@ RUN unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local && rm -f proto

WORKDIR /src

ENV GOPATH /src
ENV GOPATH=/src
4 changes: 2 additions & 2 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_builder.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ADD https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${Y
RUN echo "${YQ_CHECKSUM#sha256:} /usr/local/bin/yq" | sha256sum -c
RUN chmod a+x /usr/local/bin/yq

ENV PATH "/root/.cargo/bin:/usr/local/go/bin:$PATH"
ENV PATH="/root/.cargo/bin:/usr/local/go/bin:$PATH"

ADD https://sh.rustup.rs rustup
RUN chmod a+x rustup && ./rustup -y --default-toolchain ${RUST_VERSION}
Expand All @@ -43,4 +43,4 @@ RUN unzip protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip -d /usr/local && rm

WORKDIR /src

ENV GOPATH /src
ENV GOPATH=/src
6 changes: 3 additions & 3 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_builder.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARG YQ_VERSION
ARG YQ_CHECKSUM

ENV SMDEV_CONTAINER_OFF=1
ENV ARCH ${ARCH}
ENV ARCH=${ARCH}

# This registering RHEL when building on an unsubscribed system
# If you are running a UBI container on a registered and subscribed RHEL host, the main RHEL Server repository is enabled inside the standard UBI container
Expand Down Expand Up @@ -62,10 +62,10 @@ RUN cd cloud-utils && make install

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "${RUST_VERSION}"

ENV PATH "/root/.cargo/bin:/usr/local/go/bin:$PATH"
ENV PATH="/root/.cargo/bin:/usr/local/go/bin:$PATH"

RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${ARCH/s390x/s390_64}.zip && \
unzip protoc-${PROTOC_VERSION}-linux-${ARCH/s390x/s390_64}.zip -d /usr/local && rm -f protoc-${PROTOC_VERSION}-linux-${ARCH/s390x/s390_64}.zip

WORKDIR /src
ENV GOPATH /src
ENV=GOPATH /src
2 changes: 1 addition & 1 deletion src/csi-wrapper/Dockerfile.csi_wrappers
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN cd cloud-api-adaptor/src/csi-wrapper/ && make ARCH=${TARGETARCH} ${BINARY}

FROM ubuntu:20.04
ARG BINARY
ENV BINARY ${BINARY}
ENV BINARY=${BINARY}
WORKDIR /
COPY --from=builder /src/cloud-api-adaptor/src/csi-wrapper/build/${BINARY}/${BINARY} /usr/bin/${BINARY}
COPY --from=builder /src/cloud-api-adaptor/src/csi-wrapper/entrypoint.sh /usr/bin/entrypoint.sh
Expand Down
Loading