fix: version number not showing when run from docker image
This commit is contained in:
parent
9c98c333ad
commit
a68fcaf976
11
Dockerfile
11
Dockerfile
|
@ -18,11 +18,12 @@ RUN go mod download
|
|||
COPY . .
|
||||
|
||||
RUN go build \
|
||||
-ldflags="-X $VERSION_PKG.Version=$VERSION" \
|
||||
-ldflags="-X $VERSION_PKG.Build=$BUILD" \
|
||||
-ldflags="-X $VERSION_PKG.BuildDate=$BUILD_DATE" \
|
||||
-ldflags="-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\"" \
|
||||
-o /ytdl-web .
|
||||
-ldflags=" \
|
||||
-X $VERSION_PKG.Version=$VERSION \
|
||||
-X $VERSION_PKG.Build=$BUILD \
|
||||
-X $VERSION_PKG.BuildDate=$BUILD_DATE \
|
||||
-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\" \
|
||||
" -o /ytdl-web .
|
||||
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
env.YTDL_ENV = "Development";
|
||||
|
||||
# https://devenv.sh/packages/
|
||||
packages = with pkgs; [
|
||||
packages = with pkgs; [
|
||||
git
|
||||
air
|
||||
goreleaser
|
||||
|
@ -67,7 +67,7 @@
|
|||
output=''${2:-type=docker}
|
||||
|
||||
docker-init
|
||||
docker buildx build . \
|
||||
PROGRESS_NO_TRUNC=1 docker buildx build . \
|
||||
--tag $(docker-image):$VERSION \
|
||||
--tag $(docker-image):latest \
|
||||
--platform $platform \
|
||||
|
@ -76,6 +76,7 @@
|
|||
--build-arg BUILD=$(build-id) \
|
||||
--build-arg BUILD_DATE=$(build-date) \
|
||||
--build-arg BUILT_BY="Devenv Script" \
|
||||
--progress plain \
|
||||
--output $output
|
||||
'';
|
||||
|
||||
|
@ -102,4 +103,4 @@
|
|||
processes.web.exec = "air";
|
||||
|
||||
# See full reference at https://devenv.sh/reference/options/
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue