Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

use wolfi packages, use wolfi-dev/sdk image #41

Open
wants to merge 1 commit into
base: main
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
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/actions/release-variant
with:
variant: go
archs: amd64,aarch64,armv7
archs: amd64,arm64
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/actions/release-variant
with:
variant: js
archs: amd64,aarch64,armv7
archs: amd64,arm64
2 changes: 1 addition & 1 deletion .github/workflows/py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/actions/release-variant
with:
variant: py
archs: amd64,aarch64,armv7
archs: amd64,arm64
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/actions/release-variant
with:
variant: ruby
archs: amd64,aarch64,armv7
archs: amd64,arm64
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: ./.github/actions/release-variant
with:
variant: rust
archs: amd64,aarch64,armv7
archs: amd64,arm64
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Requirements:
- [`docker`](https://docs.docker.com/get-docker/)
- [`cosign`](https://docs.sigstore.dev/cosign/installation/)

Note: these steps should also work without `docker` on an apk-based Linux distribution such as [Alpine](https://www.alpinelinux.org/).
Note: these steps should also work without `docker`, but you may need to install [bubblewrap](https://github.com/containers/bubblewrap) to run Melange builds.

### Change directory

Expand Down Expand Up @@ -75,20 +75,20 @@ Build an apk for all architectures using melange:
```
docker run --rm --privileged -v "${PWD}":/work \
--entrypoint=melange --workdir=/work \
cgr.dev/chainguard/sdk build melange.yaml \
--arch amd64,aarch64,armv7 \
ghcr.io/wolfi-dev/sdk build melange.yaml \
--arch amd64,arm64 \
--signing-key melange.rsa
```

To debug the above:
```
docker run --rm --privileged -it -v "${PWD}":/work \
--entrypoint sh \
cgr.dev/chainguard/sdk
ghcr.io/wolfi-dev/sdk

# Build apks (use just --arch amd64 to isolate issue)
melange build melange.yaml \
--arch amd64,aarch64,armv7 \
--arch amd64,arm64 \
--signing-key melange.rsa

# Install an apk
Expand All @@ -111,7 +111,7 @@ REF="ghcr.io/${GITHUB_USERNAME}/hello-melange-apko/$(basename "${PWD}")"
docker run --rm -v "${PWD}":/work \
--entrypoint=apko --workdir=/work ghcr.io/wolfi-dev/sdk build --debug apko.yaml \
"${REF}" output.tar -k melange.rsa.pub \
--arch amd64,aarch64,armv7
--arch amd64,arm64
```

If you do not wish to push the image, you could load it directly:
Expand All @@ -131,7 +131,7 @@ docker run --rm -it -v "${PWD}":/work \
--workdir=/work ghcr.io/wolfi-dev/sdk

# Build image (use just --arch amd64 to isolate issue)
apko build --debug apko.yaml "${REF}" output.tar -k melange.rsa.pub --arch amd64,aarch64,armv7
apko build --debug apko.yaml "${REF}" output.tar -k melange.rsa.pub --arch amd64,arm64
```

## Push image with apko
Expand All @@ -155,7 +155,7 @@ docker run --rm -v "${PWD}":/work \
apko login ghcr.io -u "${GITHUB_USERNAME}" --password-stdin && \
apko publish --debug apko.yaml \
"${REF}" -k melange.rsa.pub \
--arch amd64,aarch64,armv7'
--arch amd64,arm64'
```

## Sign image with cosign
Expand Down
6 changes: 4 additions & 2 deletions go/apko.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
- /work/packages
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- hello-server
accounts:
groups:
Expand Down
7 changes: 4 additions & 3 deletions go/melange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ package:
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- go
Expand Down
6 changes: 4 additions & 2 deletions js/apko.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
- /work/packages
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- hello-server
accounts:
groups:
Expand Down
7 changes: 4 additions & 3 deletions js/melange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ package:
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- nodejs
Expand Down
6 changes: 4 additions & 2 deletions py/apko.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
- /work/packages
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- hello-server
accounts:
groups:
Expand Down
7 changes: 4 additions & 3 deletions py/melange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ package:
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- gcc
Expand Down
6 changes: 4 additions & 2 deletions ruby/apko.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
- /work/packages
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wofli-baselayout
- hello-server
accounts:
groups:
Expand Down
7 changes: 4 additions & 3 deletions ruby/melange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ package:
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- make
Expand Down
6 changes: 4 additions & 2 deletions rust/apko.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://packages.wolfi.dev/os
- /work/packages
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- hello-server
accounts:
groups:
Expand Down
7 changes: 4 additions & 3 deletions rust/melange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ package:
environment:
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
- https://dl-cdn.alpinelinux.org/alpine/edge/community
- https://packages.wolfi.dev/os
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- alpine-baselayout-data
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- cargo
Expand Down
Loading