Add version

This commit is contained in:
2026-08-29 21:02:18 +02:00
parent 1b45fb4b8a
commit 712e9d4dce
5 changed files with 70 additions and 2 deletions
+10 -1
View File
@@ -1,15 +1,24 @@
FROM golang:1.27-alpine AS builder
ARG VERSION=dev # maintained in build.sh
ARG GIT_SHA=0
WORKDIR /build
COPY go.mod ./
COPY index.html.tmpl main.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o beam .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-X main.version=${VERSION}-${GIT_SHA}" -a -installsuffix cgo -o beam .
FROM alpine:latest
ARG VERSION=0.1.0
ARG GIT_SHA=dev
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.revision="${GIT_SHA}"
RUN apk add mailcap \
&& adduser -D -u 1000 beam \
&& mkdir /uploads \