-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 613 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 613 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:1.12.9-alpine as builder
MAINTAINER cvballa3g0@gmail.com
RUN apk update && apk add git make bzr bash
ENV PATH=${PATH}:${GOPATH}/bin:/usr/local/bin
ENV GOFLAGS="-mod=vendor"
# download & cache dep layer
WORKDIR /src
COPY go.mod go.sum ./
COPY vendor ./vendor
RUN go mod verify
COPY . .
WORKDIR /src
RUN make build
RUN cp ${GOPATH}/bin/osrsloadouts /usr/local/bin
#####################################################################
# Prod image
FROM alpine:latest
RUN apk add --update --no-cache ca-certificates
COPY --from=builder /usr/local/bin/osrsloadouts /usr/local/bin/
CMD osrsloadouts