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

fix syntax warnings from newer versions of Docker #437

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions tools/buildsys/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,15 @@ impl DockerBuild {
args.build_arg("NOCACHE", &self.common_build_args.nocache);
args.build_arg("TOKEN", &self.common_build_args.token);
args.build_arg("OUTPUT_SOCKET", &self.common_build_args.output_socket);

// Skip some build checks:
// - InvalidDefaultArgInFrom warns about the SDK argument, which is always set
// - SecretsUsedInArgOrEnv warns about the TOKEN argument, which is not a secret
args.build_arg(
"BUILDKIT_DOCKERFILE_CHECK",
"skip=InvalidDefaultArgInFrom,SecretsUsedInArgOrEnv",
);

args
}
}
Expand Down
12 changes: 6 additions & 6 deletions twoliter/embedded/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG SDK
ARG ARCH
ARG GOARCH

FROM ${SDK} as sdk
FROM ${SDK} AS sdk

############################################################################################
# Section 1: The following build stages are used to build rpm.spec packages
Expand Down Expand Up @@ -194,7 +194,7 @@ COPY --from=kitbuild /tmp/.${NOCACHE} /

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
# Generate the expected RPM macros and bconds.
FROM sdk as rpm-macros-and-bconds
FROM sdk AS rpm-macros-and-bconds
ARG VARIANT
ARG VARIANT_PLATFORM
ARG VARIANT_RUNTIME
Expand Down Expand Up @@ -314,7 +314,7 @@ RUN --mount=target=/host \

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
# Builds a Bottlerocket image.
FROM repobuild as imgbuild
FROM repobuild AS imgbuild
ARG ARCH
ARG VERSION_ID
ARG BUILD_ID
Expand Down Expand Up @@ -385,7 +385,7 @@ RUN --mount=target=/host \

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
# Creates an archive of the datastore migrations.
FROM repobuild as migrationbuild
FROM repobuild AS migrationbuild
ARG ARCH
ARG VERSION_ID
ARG BUILD_ID
Expand Down Expand Up @@ -417,7 +417,7 @@ RUN --mount=target=/host \

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
# Creates an archive of kernel development sources and toolchain.
FROM repobuild as kmodkitbuild
FROM repobuild AS kmodkitbuild
# The list of packages from the variant Cargo.toml package.metadata.build-variant.packages section.
ARG PACKAGES
ARG ARCH
Expand Down Expand Up @@ -461,7 +461,7 @@ COPY --from=kmodkitbuild /tmp/.${NOCACHE} /output/

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
# Repack an existing image.
FROM sdk as imgrepack
FROM sdk AS imgrepack
ARG ARCH
ARG VERSION_ID
ARG BUILD_ID
Expand Down
Loading