We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 654ea40 commit 218d94bCopy full SHA for 218d94b
1 file changed
Dockerfile
@@ -6,10 +6,10 @@ RUN apk add --update git
6
WORKDIR /go/src/github.com/friendsofgo/graphiql
7
COPY . .
8
RUN TAG=$(git describe --tags --abbrev=0) \
9
- && LDFLAGS=$(echo "-s -X main.version="$TAG) \
10
- && go build -o /go/bin/graphiql -ldflags "$LDFLAGS" cmd/graphiql/main.go
+ && LDFLAGS=$(echo "-s -w -X main.version="$TAG) \
+ && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o /go/bin/graphiql -ldflags "$LDFLAGS" cmd/graphiql/main.go
11
12
# Building image with the binary
13
-FROM alpine
14
-COPY --from=build /go/bin/graphiql /bin/
15
-ENTRYPOINT ["graphiql"]
+FROM scratch
+COPY --from=build /go/bin/graphiql /go/bin/graphiql
+ENTRYPOINT ["/go/bin/graphiql"]
0 commit comments