Skip to content

Commit

Permalink
Compile with CGO_ENABLED=0 to have static binary for alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
tgulacsi committed Jun 30, 2021
1 parent 79fd43c commit 3c31dc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docks/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM golang:alpine as builder

RUN apk -U upgrade

RUN go install github.com/tgulacsi/agostle@latest

#FROM golang:alpine as builder
#
#RUN apk -U upgrade
#RUN go install github.com/tgulacsi/agostle@latest
#
FROM alpine:latest
MAINTAINER Tamás Gulácsi <[email protected]>

COPY --from=builder agostle /app/bin/agostle
#COPY --from=builder agostle /app/bin/agostle
RUN apk -U upgrade
RUN apk add ttf-dejavu ttf-liberation font-noto font-noto-emoji
RUN apk add msttcorefonts-installer
Expand Down
1 change: 1 addition & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -x
fn=$(pwd)/tuf.pwd
cd "$(dirname "$0")"
DEST="${GOBIN:-"$(go env GOBIN)"}"
export CGO_ENABLED=0
GOOS=linux GOARCH=amd64 go install &
GOOS=windows GOARCH=386 go build -o $DEST/agostle.exe &
(which tuf || go get -u github.com/theupdateframework/go-tuf/cmd/tuf)
Expand Down

0 comments on commit 3c31dc7

Please sign in to comment.