Skip to content

Commit a04bb78

Browse files
authored
Merge pull request #179 from imjasonh/apko
reinstate apko image
2 parents 571a315 + 4412124 commit a04bb78

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

.github/workflows/presubmit-build.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
with:
1111
image: alpine-base
1212

13+
apko:
14+
uses: ./.github/workflows/.build.yaml
15+
with:
16+
image: apko
17+
1318
gcc-musl:
1419
uses: ./.github/workflows/.build.yaml
1520
with:

.github/workflows/release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
image: alpine-base
2121
registry: ghcr.io/wolfi-dev
2222

23+
apko:
24+
uses: ./.github/workflows/.build.yaml
25+
with:
26+
image: apko
27+
registry: ghcr.io/wolfi-dev
28+
2329
gcc-musl:
2430
uses: ./.github/workflows/.build.yaml
2531
with:

images/apko/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# sdk
2+
3+
Development image for [apko](https://github.com/chainguard-dev/apko).
4+
5+
## Get It!
6+
7+
The image is available on `ghcr.io`:
8+
9+
```
10+
docker pull ghcr.io/wolfi-dev/apko:latest
11+
```

images/apko/main.tf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
terraform {
2+
required_providers {
3+
apko = { source = "chainguard-dev/apko" }
4+
oci = { source = "chainguard-dev/oci" }
5+
}
6+
}
7+
8+
variable "target_repository" {
9+
description = "The docker repo into which the image and attestations should be published."
10+
}
11+
12+
module "latest" {
13+
source = "chainguard-dev/apko/publisher"
14+
version = "0.0.17"
15+
16+
target_repository = var.target_repository
17+
config = jsonencode({
18+
contents = {
19+
packages = ["apko"]
20+
}
21+
entrypoint = {
22+
command = "/usr/bin/apko"
23+
}
24+
})
25+
check_sbom = true
26+
}
27+
28+
data "oci_exec_test" "version" {
29+
digest = module.latest.image_ref
30+
script = "docker run --rm $${IMAGE_NAME} version"
31+
}
32+
33+
resource "oci_tag" "latest" {
34+
depends_on = [data.oci_exec_test.version]
35+
digest_ref = module.latest.image_ref
36+
tag = "latest"
37+
}

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ module "alpine-base" {
5757
providers = { apko.alpine = apko.alpine }
5858
}
5959

60+
module "apko" {
61+
source = "./images/apko"
62+
target_repository = "${var.target_repository}/apko"
63+
}
64+
6065
module "busybox" {
6166
source = "./images/busybox"
6267
target_repository = "${var.target_repository}/busybox"

0 commit comments

Comments
 (0)