Merge pull request #274 from majst01/reduce-binary-size

Strip binary, update to go-1.17.6
This commit is contained in:
Juan Font 2022-01-20 11:38:52 +01:00 committed by GitHub
commit b02f8dd45d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View File

@ -18,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17.3"
go-version: "1.17"
- name: Install dependencies
run: |

View File

@ -17,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17.3"
go-version: "1.17"
- name: Run Integration tests
run: go test -tags integration -timeout 30m

View File

@ -17,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17.3" # The Go version to download (if necessary) and use.
go-version: "1.17" # The Go version to download (if necessary) and use.
# Install all the dependencies
- name: Install dependencies

View File

@ -1,5 +1,5 @@
# Builder image
FROM golang:1.17.1-bullseye AS build
FROM golang:1.17.6-bullseye AS build
ENV GOPATH /go
WORKDIR /go/src/headscale
@ -9,6 +9,7 @@ RUN go mod download
COPY . .
RUN go install -a -ldflags="-extldflags=-static" -tags netgo,sqlite_omit_load_extension ./cmd/headscale
RUN strip /go/bin/headscale
RUN test -e /go/bin/headscale
# Production image

View File

@ -1,5 +1,5 @@
# Builder image
FROM golang:1.17.1-alpine AS build
FROM golang:1.17.6-alpine AS build
ENV GOPATH /go
WORKDIR /go/src/headscale
@ -10,6 +10,7 @@ RUN go mod download
COPY . .
RUN go install -a -ldflags="-extldflags=-static" -tags netgo,sqlite_omit_load_extension ./cmd/headscale
RUN strip /go/bin/headscale
RUN test -e /go/bin/headscale
# Production image