-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (27 loc) · 1.05 KB
/
Dockerfile
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
29
30
31
32
33
FROM golang:alpine as builder
WORKDIR /go/src/github.com/justyntemme/wp
COPY ./ ./
FROM builder as user-server-build
WORKDIR /go/src/github.com/justyntemme/wp/user
RUN go mod tidy
RUN go build -o user-server server/main.go
FROM golang:alpine as user-server-run
COPY --from=user-server-build /go/src/github.com/justyntemme/wp/user/user-server /go/bin/user-server
EXPOSE 8080
ENTRYPOINT [ "/go/bin/user-server" ]
FROM builder as club-server-build
WORKDIR /go/src/github.com/justyntemme/wp/club
RUN go mod tidy
RUN go build -o club-server server/main.go
FROM golang:alpine as club-server-run
COPY --from=club-server-build /go/src/github.com/justyntemme/wp/club/club-server /go/bin/club-server
EXPOSE 8080
ENTRYPOINT [ "/go/bin/club-server" ]
FROM builder as vote-server-build
WORKDIR /go/src/github.com/justyntemme/wp/vote
RUN go mod tidy
RUN go build -o vote-server server/main.go
FROM golang:alpine as vote-server-run
COPY --from=vote-server-build /go/src/github.com/justyntemme/wp/vote/vote-server /go/bin/vote-server
EXPOSE 8080
ENTRYPOINT [ "/go/bin/vote-server" ]