diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 01c9e1d31..5ee590b90 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -27,10 +27,10 @@ Always reference these instructions first and fallback to search or bash command - The frontend requires Docker BuildKit with buildx support ### Integration Testing -- Run specific distro tests: `go test -timeout=59m -v ./test -run=TestMariner2` -- takes 30+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. +- Run specific distro tests: `go test -timeout=59m -v ./test -run=TestAzlinux3` -- takes 30+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. - Run all integration tests: `go test -timeout=59m -v ./test` -- takes 45+ minutes. NEVER CANCEL. Set timeout to 75+ minutes. - Tests require Docker and BuildKit to be working properly -- Tests cover multiple Linux distributions: Mariner2, Azlinux3, Jammy, Noble, Bullseye, Bookworm, etc. +- Tests cover multiple Linux distributions: Azlinux3, Jammy, Noble, Bullseye, Bookworm, etc. ## Validation diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9da214d13..bb215d5ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,6 @@ jobs: fail-fast: false matrix: suite: - - Mariner2 - Azlinux3 - Bookworm - Bullseye @@ -110,7 +109,7 @@ jobs: - other include: - suite: other - skip: Mariner2|Azlinux3|Bookworm|Bullseye|Bionic|Focal|Jammy|Noble|Windows|Almalinux8|Almalinux9|Rockylinux8|Rockylinux9|Trixie + skip: Azlinux3|Bookworm|Bullseye|Bionic|Focal|Jammy|Noble|Windows|Almalinux8|Almalinux9|Rockylinux8|Rockylinux9|Trixie # TODO: support diff/merge # Right now this is handled by the e2e suite, but we can migrate that here. @@ -419,8 +418,8 @@ jobs: - name: Build go-md2man example in docs run: | version=$(cat docs/examples/go-md2man.yml | yq .version) - docker build -t go-md2man:$version -f docs/examples/go-md2man.yml --target=mariner2/rpm --output=_output . - docker build -t go-md2man:$version -f docs/examples/go-md2man.yml --target=mariner2 . + docker build -t go-md2man:$version -f docs/examples/go-md2man.yml --target=azlinux3/rpm --output=_output . + docker build -t go-md2man:$version -f docs/examples/go-md2man.yml --target=azlinux3 . - name: dump logs if: failure() id: dump-logs diff --git a/.github/workflows/retag/images.yml b/.github/workflows/retag/images.yml index cf679a925..e29dfe885 100644 --- a/.github/workflows/retag/images.yml +++ b/.github/workflows/retag/images.yml @@ -67,9 +67,6 @@ - source: "mcr.microsoft.com/azurelinux/distroless/base:3.0" dest: mirror/mcr/azurelinux/distroless/base:3.0 -- source: "mcr.microsoft.com/cbl-mariner/base/core:2.0" - dest: mirror/mcr/cbl-mariner/base/core:2.0 - - source: "mcr.microsoft.com/oss/go/microsoft/golang:1.24" dest: mirror/mcr/oss/go/microsoft/golang:1.24 diff --git a/.github/workflows/worker-images/matrix.json b/.github/workflows/worker-images/matrix.json index 1e21bfa3e..512ffe001 100644 --- a/.github/workflows/worker-images/matrix.json +++ b/.github/workflows/worker-images/matrix.json @@ -1 +1 @@ -{"include":[{"target":"trixie/worker"},{"target":"bookworm/worker"},{"target":"bullseye/worker"},{"target":"bionic/worker"},{"target":"focal/worker"},{"target":"jammy/worker"},{"target":"noble/worker"},{"target":"almalinux8/worker"},{"target":"almalinux9/worker"},{"target":"rockylinux8/worker"},{"target":"rockylinux9/worker"},{"target":"mariner2/worker"},{"target":"azlinux3/worker"},{"target":"windowscross/worker"}]} +{"include":[{"target":"trixie/worker"},{"target":"bookworm/worker"},{"target":"bullseye/worker"},{"target":"bionic/worker"},{"target":"focal/worker"},{"target":"jammy/worker"},{"target":"noble/worker"},{"target":"almalinux8/worker"},{"target":"almalinux9/worker"},{"target":"rockylinux8/worker"},{"target":"rockylinux9/worker"},{"target":"azlinux3/worker"},{"target":"windowscross/worker"}]} diff --git a/docker-bake.hcl b/docker-bake.hcl index b1c1024e1..eddc26c17 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -66,7 +66,7 @@ target "maps-dep" { "dalec_frontend" = "target:frontend" } matrix = { - tgt = ["azlinux3/rpm", "mariner2/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] + tgt = ["azlinux3/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] } target = tgt } @@ -81,7 +81,7 @@ target "maps-buildstep" { "dalec_frontend" = "target:frontend" } matrix = { - tgt = ["azlinux3/rpm", "mariner2/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] + tgt = ["azlinux3/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] } target = tgt } @@ -96,7 +96,7 @@ target "maps-test" { "dalec_frontend" = "target:frontend" } matrix = { - tgt = ["azlinux3/rpm", "mariner2/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] + tgt = ["azlinux3/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] } target = tgt } @@ -111,7 +111,7 @@ target "maps-source" { "dalec_frontend" = "target:frontend" } matrix = { - tgt = ["azlinux3/rpm", "mariner2/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] + tgt = ["azlinux3/rpm", "jammy/deb", "noble/deb", "trixie/deb", "bookworm/deb", "bullseye/deb"] } target = tgt } @@ -134,12 +134,12 @@ target "runc-azlinux" { "dalec_frontend" = "target:frontend" } matrix = { - distro = ["mariner2", "azlinux3"] + distro = ["azlinux3"] tgt = ["rpm", "container", "rpm/spec"] } - target = "mariner2/${tgt}" + target = "${distro}/${tgt}" // only tag the container target - tags = tgt == "container" ? ["runc:mariner2"] : [] + tags = tgt == "container" ? ["runc:${distro}"] : [] // only output non-container targets to the fs output = tgt != "container" ? ["_output"] : [] } @@ -170,7 +170,7 @@ target "runc-jammy" { target "runc-test" { name = "runc-test-${distro}" matrix = { - distro =["mariner2", "azlinux3", "jammy"] + distro =["azlinux3", "jammy"] } contexts = { "dalec-runc-img" = "target:runc-${distro}-container" @@ -187,7 +187,7 @@ variable "BUILD_SPEC" { target "build" { name = "build-${distro}-${tgt}" matrix = { - distro = ["mariner2"] + distro = ["azlinux3"] tgt = ["rpm", "container"] } dockerfile = BUILD_SPEC diff --git a/frontend/mux.go b/frontend/mux.go index 19e80dfdc..ddc8d1eef 100644 --- a/frontend/mux.go +++ b/frontend/mux.go @@ -58,7 +58,7 @@ const ( // // When BuildMux calls a handler, it modifies the client to chomp off the // matched route prefix. So a BuildMux with receiving a build target of -// mariner2/container will match on the registered handler for mariner2 then +// azlinux3/container will match on the registered handler for azlinux3 then // call the handler with the build target changed to just container. // // Finally, BuildMux sets an extra build option on the client diff --git a/target.go b/target.go index 6b8107710..51ae3fd30 100644 --- a/target.go +++ b/target.go @@ -9,7 +9,7 @@ import ( const ( // PreBuiltPkgSuffix is what is expected to be appended to a targetKey when it's - // meant to be a target distro specific package (e.g. mariner2-pkg, azlinux3-pkg, + // meant to be a target distro specific package (e.g. azlinux3-pkg, // windowscross-pkg, bookworm-pkg, etc.). When this is provided and used to buildkit // and container, it will take precedence over GenericPkg. PreBuiltPkgSuffix = "-pkg" diff --git a/targets/linux/distro_handler.go b/targets/linux/distro_handler.go index ca5b9cf86..366f61298 100644 --- a/targets/linux/distro_handler.go +++ b/targets/linux/distro_handler.go @@ -187,7 +187,7 @@ func HandleSysext(c DistroConfig) gwclient.BuildFunc { // getPrebuiltPackage retrieves a package based on the target environment. // Target-specific packages (e.g., "{targetKey}-pkg") are prioritized over generic packages ("pkg"). // This ensures compatibility with the build context and optimizes functionality for specific environments. -// Examples of target keys include "mariner2", "azlinux3", "windowscross", and "bookworm". +// Examples of target keys include "azlinux3", "windowscross", and "bookworm". func getPrebuiltPackage(ctx context.Context, targetKey string, client gwclient.Client, opts []llb.ConstraintsOpt, sOpt dalec.SourceOpts) (llb.State, bool) { var pkgSt llb.State diff --git a/targets/linux/rpm/azlinux/common.go b/targets/linux/rpm/azlinux/common.go index 73f58cdb9..5db861a56 100644 --- a/targets/linux/rpm/azlinux/common.go +++ b/targets/linux/rpm/azlinux/common.go @@ -17,7 +17,6 @@ var ( } targets = map[string]gwclient.BuildFunc{ - Mariner2TargetKey: Mariner2Config.Handle, AzLinux3TargetKey: Azlinux3Config.Handle, } diff --git a/targets/linux/rpm/azlinux/mariner2.go b/targets/linux/rpm/azlinux/mariner2.go deleted file mode 100644 index 03e12d574..000000000 --- a/targets/linux/rpm/azlinux/mariner2.go +++ /dev/null @@ -1,30 +0,0 @@ -package azlinux - -import ( - "github.com/project-dalec/dalec/targets/linux/rpm/distro" -) - -const ( - Mariner2TargetKey = "mariner2" - tdnfCacheNameMariner2 = "mariner2-tdnf-cache" - - Mariner2Ref = "mcr.microsoft.com/cbl-mariner/base/core:2.0" - Mariner2FullName = "CBL-Mariner 2" - Mariner2WorkerContextName = "dalec-mariner2-worker" -) - -var Mariner2Config = &distro.Config{ - ImageRef: "mcr.microsoft.com/cbl-mariner/base/core:2.0", - ContextRef: Mariner2WorkerContextName, - - CacheName: tdnfCacheNameMariner2, - CacheDir: []string{"/var/cache/tdnf", "/var/cache/dnf"}, - CacheAddPlatform: true, - - ReleaseVer: "2.0", - BuilderPackages: append(builderPackages, "dnf"), - BasePackages: basePackages(Mariner2TargetKey), - RepoPlatformConfig: &defaultAzlinuxRepoPlatform, - InstallFunc: distro.TdnfInstall, - FullName: Mariner2FullName, -} diff --git a/targets/plugin/init.go b/targets/plugin/init.go index 53236ecd7..ffaee46de 100644 --- a/targets/plugin/init.go +++ b/targets/plugin/init.go @@ -26,7 +26,6 @@ func init() { targets.RegisterBuildTarget(rockylinux.V8TargetKey, rockylinux.ConfigV8.Handle) targets.RegisterBuildTarget(rockylinux.V9TargetKey, rockylinux.ConfigV9.Handle) - targets.RegisterBuildTarget(azlinux.Mariner2TargetKey, azlinux.Mariner2Config.Handle) targets.RegisterBuildTarget(azlinux.AzLinux3TargetKey, azlinux.Azlinux3Config.Handle) targets.RegisterBuildTarget(windows.DefaultTargetKey, windows.Handle) diff --git a/test/fixtures/env-multiple-commands.yml b/test/fixtures/env-multiple-commands.yml index 95f6100cc..cdb1ee581 100644 --- a/test/fixtures/env-multiple-commands.yml +++ b/test/fixtures/env-multiple-commands.yml @@ -9,10 +9,6 @@ vendor: Microsoft packager: Microsoft license: Apache 2.0 -targets: # Distro specific build requirements - mariner2: - dependencies: - build: steps: - command: | diff --git a/test/fixtures/moby-runc.yml b/test/fixtures/moby-runc.yml index e14762b51..144278a10 100644 --- a/test/fixtures/moby-runc.yml +++ b/test/fixtures/moby-runc.yml @@ -7,6 +7,7 @@ args: RUNC_COMMIT: REVISION: 1 VERSION: + DALEC_TARGET: name: moby-runc description: A CLI tool for spawning and running containers according to the OCI specification. @@ -52,8 +53,6 @@ x-azl: &azl targets: # Distro specific build requirements azlinux3: <<: *azl - mariner2: - <<: *azl jammy: image: dependencies: @@ -91,10 +90,14 @@ build: CGO_ENABLED: 1 GOGC: off GOFLAGS: -trimpath + DALEC_TARGET: "${DALEC_TARGET}" steps: - command: | - set -e + set -eu cd src + if [ "${DALEC_TARGET}" = "azlinux3" ]; then + export GOEXPERIMENT=nosystemcrypto + fi make man runc BUILDTAGS=seccomp artifacts: binaries: diff --git a/test/linux_target_test.go b/test/linux_target_test.go index 4708832d9..2c70792c9 100644 --- a/test/linux_target_test.go +++ b/test/linux_target_test.go @@ -5498,7 +5498,6 @@ echo "This is a third test binary" }, Targets: map[string]dalec.Target{ "azlinux3": rpmTarget, - "mariner2": rpmTarget, "almalinux8": rpmTarget, "almalinux9": rpmTarget, "rockylinux8": rpmTarget, diff --git a/test/multiple_artifacts_test.go b/test/multiple_artifacts_test.go index 1082384f2..cf452e06a 100644 --- a/test/multiple_artifacts_test.go +++ b/test/multiple_artifacts_test.go @@ -89,9 +89,9 @@ func testTargetArtifactsTakePrecedence(ctx context.Context, t *testing.T, target vals := strings.Split(targetCfg.Package, "/") primaryTarget := vals[0] // prevent primaryTarget from being the same as secondaryTarget or tertiaryTarget - secondaryTarget := "mariner2" + secondaryTarget := "azlinux3" if primaryTarget == secondaryTarget { - secondaryTarget = "azlinux3" + secondaryTarget = "almalinux9" } tertiaryTarget := "bookworm" if primaryTarget == "bookworm" { diff --git a/test/target_azlinux_test.go b/test/target_azlinux_test.go index 9c1adcb5b..d6a649849 100644 --- a/test/target_azlinux_test.go +++ b/test/target_azlinux_test.go @@ -37,52 +37,6 @@ metadata_expire=0 } } -func TestMariner2(t *testing.T) { - t.Parallel() - - ctx := startTestSpan(baseCtx, t) - cfg := testLinuxConfig{ - Target: targetConfig{ - Key: azlinux.Mariner2TargetKey, - Package: "mariner2/rpm", - Container: "mariner2/container", - DepsOnly: "mariner2/container/depsonly", - Worker: "mariner2/worker", - FormatDepEqual: func(v, _ string) string { - return v - }, - ListExpectedSignFiles: azlinuxListSignFiles("cm2"), - }, - LicenseDir: "/usr/share/licenses", - SystemdDir: struct { - Units string - Targets string - }{ - Units: "/usr/lib/systemd", - Targets: "/etc/systemd/system", - }, - Worker: workerConfig{ - ContextName: azlinux.Mariner2WorkerContextName, - CreateRepo: createYumRepo(azlinux.Mariner2Config), - SignRepo: signRepoDnf, - TestRepoConfig: azlinuxTestRepoConfig, - }, - Release: OSRelease{ - ID: "mariner", - VersionID: "2.0", - }, - SupportsGomodVersionUpdate: true, - Platforms: []ocispecs.Platform{ - {OS: "linux", Architecture: "amd64"}, - {OS: "linux", Architecture: "arm64"}, - }, - PackageOutputPath: rpmTargetOutputPath("cm2"), - } - - testLinuxDistro(ctx, t, cfg) - testAzlinuxExtra(ctx, t, cfg, azlinux.Mariner2Config.ImageRef) -} - func TestAzlinux3(t *testing.T) { t.Parallel() diff --git a/test/windows_test.go b/test/windows_test.go index 2efd7d69f..f6c29bc17 100644 --- a/test/windows_test.go +++ b/test/windows_test.go @@ -713,7 +713,7 @@ func getZipperState(ctx context.Context, t *testing.T, gwc gwclient.Client) llb. }, }) - sr := newSolveRequest(withSpec(ctx, t, zipperSpec), withBuildTarget("mariner2/container")) + sr := newSolveRequest(withSpec(ctx, t, zipperSpec), withBuildTarget("azlinux3/container")) zipper := reqToState(ctx, gwc, sr, t) return zipper } diff --git a/website/docs/architecture.md b/website/docs/architecture.md index f931eb000..e1ae78577 100644 --- a/website/docs/architecture.md +++ b/website/docs/architecture.md @@ -37,7 +37,7 @@ flowchart TB Detailed sequence: 1. **BuildKit invokes the frontend** with a build context containing a Dalec spec (the spec is the effective `Dockerfile` for the custom frontend). -2. **`BuildMux` resolves the target**: exact match, default handler, or prefix routing (e.g. `mariner2/container`). The matched handler sees the shortened target and a `dalec.target` build option that identifies the active spec target stanza. +2. **`BuildMux` resolves the target**: exact match, default handler, or prefix routing (e.g. `azlinux3/container`). The matched handler sees the shortened target and a `dalec.target` build option that identifies the active spec target stanza. 3. **Specs load once per build** through `LoadSpec`, which reads the spec from the Docker build context, merges build-arg substitutions (including derived platform arguments), and returns a `*dalec.Spec`. 4. **`BuildWithPlatform` fans out per platform** requested by the client, invoking a target handler for each architecture. Handler closures return an image reference and optional `dalec.DockerImageSpec` metadata. 5. **Handlers construct LLB graphs** using helpers from the `dalec` package to fetch sources, apply patches, run build steps, and generate artifacts (packages, root filesystems, signatures). diff --git a/website/docs/developers.md b/website/docs/developers.md index 35b216ca9..a44cc2ba1 100644 --- a/website/docs/developers.md +++ b/website/docs/developers.md @@ -233,13 +233,12 @@ Integration tests are comprehensive and time-consuming. Run them for significant make test-integration # Or test a specific distribution -make test-integration SUITE=Mariner2 make test-integration SUITE=Azlinux3 make test-integration SUITE=Jammy make test-integration SUITE=Bookworm ``` -**Available test suites**: Mariner2, Azlinux3, Bookworm, Bullseye, Bionic, Focal, Jammy, Noble, Windows, Almalinux8, Almalinux9, Rockylinux8, Rockylinux9 +**Available test suites**: Azlinux3, Bookworm, Bullseye, Bionic, Focal, Jammy, Noble, Windows, Almalinux8, Almalinux9, Rockylinux8, Rockylinux9 ### Testing Specific Components diff --git a/website/docs/examples/targets.md b/website/docs/examples/targets.md index 33c337bb2..8423c6072 100644 --- a/website/docs/examples/targets.md +++ b/website/docs/examples/targets.md @@ -41,11 +41,6 @@ jammy/deb (default) Builds a deb package. jammy/dsc Builds a Debian source package. jammy/testing/container Builds a container image for testing purposes only. jammy/worker Builds the worker image. -mariner2/container (default) Builds a container image for CBL-Mariner 2 -mariner2/container/depsonly Builds a container image with only the runtime dependencies installed. -mariner2/rpm Builds an rpm and src.rpm. -mariner2/rpm/debug Debug options for rpm builds. -mariner2/worker Builds the base worker image responsible for building the rpm noble/deb (default) Builds a deb package. noble/dsc Builds a Debian source package. noble/testing/container Builds a container image for testing purposes only. diff --git a/website/docs/image.md b/website/docs/image.md index 123653351..9c98414fe 100644 --- a/website/docs/image.md +++ b/website/docs/image.md @@ -42,7 +42,7 @@ Example: ```yaml image: - base: mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0 + base: docker.io/library/ubuntu:jammy ``` diff --git a/website/docs/signing.md b/website/docs/signing.md index bc5a6d355..0ad6df1e4 100644 --- a/website/docs/signing.md +++ b/website/docs/signing.md @@ -31,7 +31,7 @@ operation: ```yaml name: my-package targets: # Distro specific build requirements - mariner2: + azlinux3: package_config: signer: image: "ref/to/signing:image" @@ -41,7 +41,7 @@ targets: # Distro specific build requirements At this time, these targets can leverage package signing: - `windowscross/zip` -- `mariner2/rpm` +- `azlinux3/rpm` - `windowscross/container` For container targets, only the artifacts within the container get signed. @@ -60,7 +60,7 @@ additional tooling necessary to carry out the signing operation. 1. The `llb.State` corresponding the artifacts to be signed will be provided as the build context. 1. Dalec will provide the value of `dalec.target` to the frontend as a -`FrontendOpt`. In the above example, this will be `mariner2`. +`FrontendOpt`. In the above example, this will be `azlinux3`. 1. The response from the frontend will contain an `llb.State` that is identical to the input `llb.State` in every way *except* that the desired artifacts will be signed. @@ -155,7 +155,7 @@ a string-to-string mapping like so: ```yaml targets: # Distro specific build requirements - mariner2: + azlinux3: package_config: signer: image: "ref/to/signing:image" @@ -175,7 +175,7 @@ args: SOME_OTHER_SIGNING_ARG: "default_value" targets: # Distro specific build requirements - mariner2: + azlinux3: package_config: signer: image: "ref/to/signing:image" diff --git a/website/docs/sources.md b/website/docs/sources.md index b1bd4a929..31708efd7 100644 --- a/website/docs/sources.md +++ b/website/docs/sources.md @@ -6,7 +6,7 @@ The source abstraction enables fetching build sources over various protocols. Some sources are considered as inherently file-based sources, like HTTP URLs or local directories. Other sources are considered as inherently directory-based sources, like git repositories. -Depending on the source type, the behavior of certain things may be different, depending on the target implementation (e.g. mariner2, jammy, windows, etc). +Depending on the source type, the behavior of certain things may be different, depending on the target implementation (e.g. azlinux3, jammy, windows, etc). Sources are injected into the root path of the build environment using the name of the source. Ideally the content of a source is platform agnostic (e.g. no platform specific binaries). diff --git a/website/docs/spec.md b/website/docs/spec.md index a663b0f49..3015e4756 100644 --- a/website/docs/spec.md +++ b/website/docs/spec.md @@ -47,7 +47,7 @@ args: These arguments are set based on the default docker platform for the machine, *unless* the platform is overridden explicitly in the docker build with `--platform`. For example, upon invoking `docker build` on a Linux amd64 machine, we would have `TARGETOS=linux`, `TARGETARCH=amd64`, `TARGETPLATFORM=linux/amd64`. -`DALEC_TARGET` is set to the target name, such as `mariner2`, `azlinux3`, or `windowscross`. +`DALEC_TARGET` is set to the target name, such as `azlinux3` or `windowscross`. :::note No default value should be included for these build args. These args are opt-in. If you haven't listed them in the args section as shown above, Dalec will **not** substitute values for them. @@ -135,17 +135,6 @@ Targets section is used to define configuration per target. Each target can have ```yaml targets: - mariner2: - image: - base: mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0 - post: - symlinks: - /usr/bin/my-binary: - paths: - - /my-binary - package_config: - signer: - image: example.com/signer:latest azlinux3: # same fields as above windowscross: @@ -165,7 +154,7 @@ Example: ```yaml image: - base: mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0 + base: mcr.microsoft.com/azurelinux/distroless/minimal:3.0 post: symlinks: /usr/bin/my-binary: diff --git a/website/docs/targets.md b/website/docs/targets.md index 78f6c3a55..66357aed4 100644 --- a/website/docs/targets.md +++ b/website/docs/targets.md @@ -12,7 +12,6 @@ When executing a build with Docker these targets can be specified with the DALEC includes a number of built-in targets that you can either use in your spec. -- `mariner2` - Azure Linux 2 (formerly CBL-Mariner) - `azlinux3` - Azure Linux 3 - `bullseye` - Debian 11 (Bullseye) (v0.11) - `bookworm` - Debian 12 (Bookworm) (v0.11) @@ -80,7 +79,7 @@ Please note that dependencies under a target will override dependencies at the r ```yaml targets: - mariner2: + azlinux3: dependencies: build: - golang @@ -94,9 +93,9 @@ This method allows for the use of a single spec file for all targets, employing ```yaml targets: - mariner2: + azlinux3: frontend: - image: docker.io/my/custom:mariner2 + image: docker.io/my/custom:azlinux3 ``` ## Advanced Customization @@ -108,8 +107,8 @@ image that are not typically available in the base image. As an example, a package dependency may not be available in the default package repositories. You can have Dalec output an image with the target's worker image with -`/worker>` build target, e.g. `--target=mariner2/worker`. You can then -add any customizations and feed that back in via [source polices](#source-policies) +`/worker>` build target, e.g. `--target=azlinux3/worker`. You can then +add any customizations and feed that back in via [source policies](#source-policies) or [named build contexts](#named-build-contexts). @@ -133,22 +132,15 @@ which allows you to provide additional build contexts apart from the main build context in the form of `=`. See the prior linked documentation for what can go into ``. -In the `mariner2` target, Dalec looks for a named context called either - -1. The actual base image used internally for mariner2 - i. `--build-context mcr.microsoft.com/cbl-mariner/base/core:2.0=` -2. A build context named `dalec-mariner2-worker` - i. `--build-context dalec-mariner2-worker=` - -If 1 is provided, then 2 is ignored. - -This works the same way in the `azlinux3`: +In the `azlinux3` target, Dalec looks for a named context called either 1. The actual base image used internally for azlinux3 i. `--build-context mcr.microsoft.com/azurelinux/base/core:3.0=` -2. A build context named `dalec-mariner2-worker` +2. A build context named `dalec-azlinux3-worker` i. `--build-context dalec-azlinux3-worker=` +If 1 is provided, then 2 is ignored. + ### Target Defined Artifacts There are some situations where you may want to have multiple builds and for those different @@ -187,7 +179,7 @@ This allows you to define package metadata that is specific to a target. ```yaml targets: - mariner2: + azlinux3: package: conflicts: - "foo" diff --git a/website/docs/verifying-images.md b/website/docs/verifying-images.md index fe281fdbf..d69b32a95 100644 --- a/website/docs/verifying-images.md +++ b/website/docs/verifying-images.md @@ -41,7 +41,7 @@ cosign verify ghcr.io/project-dalec/dalec/frontend:$VERSION \ --certificate-identity https://github.com/project-dalec/dalec/.github/workflows/frontend-image.yml@refs/tags/$VERSION # 3. If verification succeeds, you can safely use Dalec -docker build -f my-spec.yml --target mariner2/rpm . +docker build -f my-spec.yml --target azlinux3/rpm . ``` If verification fails, **do not use that image** - it may be compromised or unofficial. @@ -236,7 +236,7 @@ jobs: - name: Build Package with Dalec run: | # Now safely use Dalec to build your package - docker build -f my-package.yml --target mariner2/rpm -o ./output . + docker build -f my-package.yml --target azlinux3/rpm -o ./output . ``` ### GitLab CI Example @@ -259,7 +259,7 @@ build-package: stage: build needs: [verify-dalec] script: - - docker build -f my-package.yml --target mariner2/rpm -o ./output . + - docker build -f my-package.yml --target azlinux3/rpm -o ./output . ``` ### Best Practices