Compare commits
3 Commits
c7ebf79dc3
...
b152fc3e7a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b152fc3e7a | ||
|
|
97b420972b | ||
|
|
ea2cb2a7ae |
@@ -17,6 +17,7 @@ packages:
|
||||
- qemu-openrc
|
||||
- qemu-modules
|
||||
- qemu-aarch64
|
||||
- jq
|
||||
|
||||
tasks:
|
||||
- prep: |
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
FROM docker.io/library/alpine:3
|
||||
|
||||
LABEL org.opencontainers.image.title=jswank/alpine-cli \
|
||||
org.opencontainers.image.description="A minimal image for running Linux CLI utilities" \
|
||||
org.opencontainers.image.url=https://git.sr.ht/~jswank/alpine-cli \
|
||||
org.opencontainers.image.authors="Jason Swank" \
|
||||
org.opencontainers.image.licenses=MIT
|
||||
|
||||
RUN apk --no-cache update
|
||||
|
||||
RUN apk -U --no-cache add \
|
||||
|
||||
13
Taskfile.yml
13
Taskfile.yml
@@ -18,14 +18,23 @@ tasks:
|
||||
- (podman manifest exists {{.IMAGE}}:{{.TAG}} && podman manifest rm {{.IMAGE}}:{{.TAG}}) || true
|
||||
- podman manifest create {{.IMAGE}}:{{.TAG}}
|
||||
- podman build {{.CLI_ARGS}} --platform linux/amd64,linux/arm64 --manifest {{.IMAGE}}:{{.TAG}} {{.CLI_ARGS}} -f Dockerfile ctx
|
||||
|
||||
- |
|
||||
DIGESTS=$(podman manifest inspect {{.IMAGE}}:{{.TAG}} | jq -r '.manifests[].digest')
|
||||
for DIGEST in $DIGESTS; do
|
||||
echo "Annotating digest: $DIGEST"
|
||||
podman manifest annotate \
|
||||
--annotation org.opencontainers.image.description="A minimal image for running Linux CLI utilities" \
|
||||
--annotation org.opencontainers.image.url=https://git.sr.ht/~jswank/alpine-cli \
|
||||
--annotation org.opencontainers.image.title=jswank/alpine-cli \
|
||||
{{.IMAGE}}:{{.TAG}} $DIGEST
|
||||
done
|
||||
publish:
|
||||
desc: publish the image with the default tag, 'current', and 'latest'
|
||||
cmds:
|
||||
- task: _publish
|
||||
- task: _publish
|
||||
vars:
|
||||
ALT_TAG: 'current'
|
||||
ALT_TAG: 'latest'
|
||||
|
||||
_publish:
|
||||
desc: publish the image
|
||||
|
||||
21
justfile
21
justfile
@@ -1,21 +0,0 @@
|
||||
set dotenv-load
|
||||
|
||||
tag := `grep ^FROM Dockerfile | cut -d: -f2`
|
||||
image := "jswank/alpine-cli"
|
||||
|
||||
registry := "ghcr.io"
|
||||
registry_user := "jswank"
|
||||
|
||||
# this environment variable will be passed to podman login as the password
|
||||
registry_pass_var := "REGISTRY_PASSWORD"
|
||||
|
||||
# build a new image
|
||||
build flags="":
|
||||
podman build -t {{image}}:{{tag}} {{flags}} -f Dockerfile ctx
|
||||
|
||||
# publish the image
|
||||
publish alt_tag=tag:
|
||||
@ podman tag {{image}}:{{tag}} {{registry}}/{{image}}:{{alt_tag}}
|
||||
@ echo "${{ registry_pass_var }}" | podman login {{registry}} -u {{registry_user}} --password-stdin
|
||||
@ podman push {{registry}}/{{image}}:{{alt_tag}}
|
||||
@ podman logout {{registry}}
|
||||
Reference in New Issue
Block a user