File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1- # TODO: How should we version the image? auroraboot version + a build version?
2- ARG VERSION=v0.3.2
1+ ARG VERSION=v0.0.0
32ARG LUET_VERSION=0.35.5
43ARG LEAP_VERSION=15.5
54
65FROM quay.io/luet/base:$LUET_VERSION AS luet
76
87FROM golang AS builder
9- ARG BINARY_VERSION=v0.0.0
108WORKDIR /work
119ADD go.mod .
1210ADD go.sum .
1311RUN go mod download
1412ADD . .
15- RUN CGO_ENABLED=0 go build -ldflags "-X main.version=${BINARY_VERSION }" -o auroraboot
13+ RUN CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION }" -o auroraboot
1614
1715FROM opensuse/leap:$LEAP_VERSION as default
1816RUN zypper ref && zypper dup -y
Original file line number Diff line number Diff line change @@ -5,10 +5,22 @@ ARG --global GO_VERSION=1.23-bookworm
55ARG IMAGE_VERSION= v3.2.1
66ARG --global BASE_IMAGE= quay.io/kairos/ubuntu:24.04-core-amd64-generic-${IMAGE_VERSION }-uki
77
8+
9+ version :
10+ FROM alpine
11+ RUN apk update && apk add git
12+
13+ COPY . .
14+ RUN --no-cache git describe --always --tags --dirty > VERSION
15+ SAVE ARTIFACT VERSION VERSION
16+
817image :
9- FROM DOCKERFILE -f Dockerfile .
18+ FROM +version
19+ ARG VERSION= $(cat VERSION)
20+
21+ FROM DOCKERFILE --build-arg VERSION= $VERSION -f Dockerfile .
1022
11- SAVE IMAGE quay.io/kairos/auroraboot
23+ SAVE IMAGE quay.io/kairos/auroraboot: $VERSION
1224
1325test-label :
1426 FROM alpine
You can’t perform that action at this time.
0 commit comments