Skip to content

Commit 89f7739

Browse files
committed
Adding initial version of Dockerfile
1 parent 383bb63 commit 89f7739

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM golang:alpine AS build
2+
3+
LABEL MAINTAINER = 'Friends of Go (it@friendsofgo.tech)'
4+
5+
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
11+
12+
# Building image with the binary
13+
FROM alpine
14+
COPY --from=build /go/bin/graphiql /bin/
15+
ENTRYPOINT ["graphiql"]

0 commit comments

Comments
 (0)