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 . .
|
COPY . .
|
||||||
|
|
||||||
RUN go build \
|
RUN go build \
|
||||||
-ldflags="-X $VERSION_PKG.Version=$VERSION" \
|
-ldflags=" \
|
||||||
-ldflags="-X $VERSION_PKG.Build=$BUILD" \
|
-X $VERSION_PKG.Version=$VERSION \
|
||||||
-ldflags="-X $VERSION_PKG.BuildDate=$BUILD_DATE" \
|
-X $VERSION_PKG.Build=$BUILD \
|
||||||
-ldflags="-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\"" \
|
-X $VERSION_PKG.BuildDate=$BUILD_DATE \
|
||||||
-o /ytdl-web .
|
-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\" \
|
||||||
|
" -o /ytdl-web .
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
env.YTDL_ENV = "Development";
|
env.YTDL_ENV = "Development";
|
||||||
|
|
||||||
# https://devenv.sh/packages/
|
# https://devenv.sh/packages/
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
git
|
git
|
||||||
air
|
air
|
||||||
goreleaser
|
goreleaser
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
output=''${2:-type=docker}
|
output=''${2:-type=docker}
|
||||||
|
|
||||||
docker-init
|
docker-init
|
||||||
docker buildx build . \
|
PROGRESS_NO_TRUNC=1 docker buildx build . \
|
||||||
--tag $(docker-image):$VERSION \
|
--tag $(docker-image):$VERSION \
|
||||||
--tag $(docker-image):latest \
|
--tag $(docker-image):latest \
|
||||||
--platform $platform \
|
--platform $platform \
|
||||||
|
@ -76,6 +76,7 @@
|
||||||
--build-arg BUILD=$(build-id) \
|
--build-arg BUILD=$(build-id) \
|
||||||
--build-arg BUILD_DATE=$(build-date) \
|
--build-arg BUILD_DATE=$(build-date) \
|
||||||
--build-arg BUILT_BY="Devenv Script" \
|
--build-arg BUILT_BY="Devenv Script" \
|
||||||
|
--progress plain \
|
||||||
--output $output
|
--output $output
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -102,4 +103,4 @@
|
||||||
processes.web.exec = "air";
|
processes.web.exec = "air";
|
||||||
|
|
||||||
# See full reference at https://devenv.sh/reference/options/
|
# See full reference at https://devenv.sh/reference/options/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue