Skip to content

Commit 4235793

Browse files
committed
Add Dockerfile
1 parent 4c34a07 commit 4235793

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules
2+
/dist
3+
/.git

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM node:10.21.0-jessie AS build_node
2+
WORKDIR /tmp/ssl-vision-client
3+
COPY . .
4+
RUN yarn install
5+
RUN yarn build
6+
7+
FROM golang:1.14-alpine AS build_go
8+
WORKDIR /go/src/github.com/RoboCup-SSL/ssl-vision-client
9+
COPY . .
10+
COPY --from=build_node /tmp/ssl-vision-client/dist dist
11+
RUN go get -v -t -d ./...
12+
RUN go get -v github.com/gobuffalo/packr/packr
13+
WORKDIR cmd/ssl-vision-client
14+
RUN GOOS=linux GOARCH=amd64 packr build -o ../../release/ssl-vision-client_linux_amd64
15+
16+
# Start fresh from a smaller image
17+
FROM alpine:3.9
18+
COPY --from=build_go /go/src/github.com/RoboCup-SSL/ssl-vision-client/release/ssl-vision-client_linux_amd64 /app/ssl-vision-client
19+
EXPOSE 8082
20+
ENTRYPOINT ["/app/ssl-vision-client"]
21+
CMD ["/app/ssl-vision-client", "-address", ":8082"]

0 commit comments

Comments
 (0)