change version var

This commit is contained in:
2026-02-08 22:52:26 +01:00
parent d1e54774a7
commit 557a73a8b4
3 changed files with 6 additions and 60 deletions

View File

@@ -1,9 +1,11 @@
FROM golang:1.25.7-alpine3.22 AS build
ARG VERSION="0.1.0"
ENV VERSION=$VERSION
COPY . /src
RUN cd /src \
&& go build -o dockerupdater \
&& CGO_ENABLED=0 GORISCV64=rva22u64 GOAMD64=v3 GOARM64=v8.2 go build -ldflags="-s -w -X docker-updater/constant.version=$VERSION" -o dockerupdater \
&& mkdir -p ./fs/var/opt/dockerupdater \
&& mkdir -p ./fs/opt/dockerupdater \
&& cp dockerupdater ./fs/opt/dockerupdater/dockerupdater