Skip to content

Commit

Permalink
change version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ng Tze Yang committed Mar 3, 2024
1 parent 102c096 commit 81c00f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17-alpine as builder
FROM golang:1.19-alpine as builder
ARG UPX_VERSION=3.95

WORKDIR /app
Expand All @@ -11,14 +11,7 @@ RUN go mod download
# Then build the binary
COPY ./ ./

RUN set -euo pipefail && \
go build -v -ldflags "-linkmode external -extldflags -static -s -w"; \
wget https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz; \
tar xvf upx-${UPX_VERSION}-amd64_linux.tar.xz; \
mv upx-${UPX_VERSION}-amd64_linux/upx /usr/local/bin/; \
rm -r upx-${UPX_VERSION}-amd64_linux upx-${UPX_VERSION}-amd64_linux.tar.xz; \
upx --best --lzma registrywatcher; \
:
RUN go build

FROM alpine:3.9 as release
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-golang
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17-alpine
FROM golang:1.19-alpine

# Only install hard dependencies
RUN apk add --no-cache gcc git musl-dev make
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ require (

replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43

go 1.17
go 1.19

0 comments on commit 81c00f9

Please sign in to comment.