Skip to content

Commit

Permalink
Merge pull request #3 from lowply/cancel-msb
Browse files Browse the repository at this point in the history
Stop using multi stage build
  • Loading branch information
lowply authored May 20, 2019
2 parents 936c726 + a5a22d3 commit 138c53b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM golang:1 AS builder
WORKDIR /go/src
COPY src .
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/main .
FROM golang:1

LABEL "com.github.actions.name"="Issue From Template"
LABEL "com.github.actions.description"="Issue From Template"
Expand All @@ -11,9 +8,9 @@ LABEL "repository"="https://github.com/lowply/issue-from-template"
LABEL "homepage"="https://github.com/lowply/issue-from-template"
LABEL "maintainer"="Sho Mizutani <[email protected]>"

FROM alpine:latest AS runner
RUN apk --no-cache add ca-certificates
COPY --from=builder /go/bin/main /usr/local/bin/
WORKDIR /go/src
COPY src .
RUN GO111MODULE=on go build -o /go/bin/main

ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [ -z "$GITHUB_TOKEN" ]; then
exit 1
fi

main
/go/bin/main

0 comments on commit 138c53b

Please sign in to comment.