Skip to content

Commit b6dd2b6

Browse files
committed
fix Dockerfile
1 parent 5d47819 commit b6dd2b6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

build/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
FROM node:13-alpine as ui-build
2-
COPY web .
2+
COPY web /tmp/web
3+
WORKDIR /tmp/web
34
RUN yarn install --silent && yarn build
45

56
FROM golang:1.13-alpine as build
7+
WORKDIR /tmp/playground
68
COPY cmd ./cmd
79
COPY pkg ./pkg
810
COPY go.mod .
@@ -11,8 +13,9 @@ RUN go build -o server ./cmd/playground
1113

1214
FROM golang:1.13-alpine as production
1315
WORKDIR /opt/playground
16+
ENV GOROOT /usr/local/go
1417
COPY data ./data
15-
COPY --from=ui-build web/build ./public
16-
COPY --from=build server .
18+
COPY --from=ui-build /tmp/web/build ./public
19+
COPY --from=build /tmp/playground/server .
1720
EXPOSE 8000
18-
CMD ['/opt/playground/server', '-f=/opt/playground/data/packages.json']
21+
ENTRYPOINT ["/opt/playground/server", "-f=/opt/playground/data/packages.json"]

0 commit comments

Comments
 (0)