-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
17 lines (16 loc) · 915 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM golang:1.11 AS build
WORKDIR /root/
ADD . .
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo github.com/hpidcock/pub2sub/cmd/publisher
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo github.com/hpidcock/pub2sub/cmd/distributor
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo github.com/hpidcock/pub2sub/cmd/planner
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo github.com/hpidcock/pub2sub/cmd/executor
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo github.com/hpidcock/pub2sub/cmd/subscriber
FROM alpine
RUN apk add --no-cache ca-certificates
WORKDIR /usr/local/bin
COPY --from=build /root/publisher publisher
COPY --from=build /root/distributor distributor
COPY --from=build /root/planner planner
COPY --from=build /root/executor executor
COPY --from=build /root/subscriber subscriber