-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (21 loc) · 808 Bytes
/
Dockerfile
File metadata and controls
23 lines (21 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:latest as frontendCompiler
COPY ./ /go/src/github.com/dev-chat/baseball
RUN cd /go/src/github.com/dev-chat/baseball/baseball_frontend && \
npm i && \
npm run build && \
rm -rf node_modules
FROM golang:latest as backendCompiler
COPY ./ /go/src/github.com/dev-chat/baseball
COPY --from=frontendCompiler \
go/src/github.com/dev-chat/baseball/baseball_frontend/build\
go/src/github.com/dev-chat/baseball/baseball_frontend/build\
/
RUN cd /go/src/github.com/dev-chat/baseball && go build .
FROM alpine:latest as out
RUN apk add --no-cache \
libc6-compat
COPY --from=backendCompiler /go/src/github.com/dev-chat/baseball/baseball .
COPY --from=backendCompiler \
go/src/github.com/dev-chat/baseball/baseball_frontend/build \
./baseball_frontend/build
CMD "./baseball"