Last change
on this file since 90 was 90, checked in by alex, 6 years ago |
Add Dockerfile and Makefile
|
File size:
442 bytes
|
Line | |
---|
1 | # STEP 1 build executable binary
|
---|
2 | FROM golang:alpine as builder
|
---|
3 |
|
---|
4 | WORKDIR $GOPATH/src/github.com/asciimoo/morty
|
---|
5 |
|
---|
6 | RUN apk add --no-cache git
|
---|
7 |
|
---|
8 | COPY . .
|
---|
9 | RUN go get -d -v
|
---|
10 | RUN go build .
|
---|
11 |
|
---|
12 | # STEP 2 build the image including only the binary
|
---|
13 | FROM alpine:latest
|
---|
14 |
|
---|
15 | EXPOSE 3000
|
---|
16 |
|
---|
17 | WORKDIR /
|
---|
18 | RUN apk --no-cache add ca-certificates
|
---|
19 | RUN mkdir /etc/morty
|
---|
20 |
|
---|
21 | COPY --from=builder /go/src/github.com/asciimoo/morty/morty /usr/bin/morty
|
---|
22 |
|
---|
23 | ENTRYPOINT ["/usr/bin/morty"]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.