Last active
September 30, 2019 10:23
-
-
Save yutakahashi114/e55976d40aa096b10cef97e3fe391363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 開発 | |
FROM golang:latest as dev | |
RUN apt-get update \ | |
&& apt-get install -y vim \ | |
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
# 本番ビルド用 | |
FROM golang:latest as builder | |
WORKDIR /go/src/app/ | |
COPY ./src/app . | |
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build server.go | |
# 本番 | |
FROM alpine:latest as prod | |
EXPOSE 8080 | |
WORKDIR /api | |
COPY --from=builder /go/src/app/server . | |
CMD ["./server"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment