Skip to content

Commit 2eb2e7d

Browse files
committed
feature: Dockerize
1 parent 0a2b333 commit 2eb2e7d

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.dockerignore

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

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM node:15.7.0-alpine3.11 AS build_node
2+
WORKDIR /tmp/ssl-game-controller
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-game-controller
9+
COPY . .
10+
COPY --from=build_node /tmp/ssl-game-controller/dist dist
11+
RUN go get -v -t -d ./...
12+
RUN go get -v github.com/gobuffalo/packr/packr
13+
WORKDIR cmd/ssl-game-controller
14+
RUN GOOS=linux GOARCH=amd64 packr build -o ../../release/ssl-game-controller_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-game-controller/release/ssl-game-controller_linux_amd64 /app/ssl-game-controller
19+
EXPOSE 8081 10007 10008 10011 10009
20+
ENTRYPOINT ["/app/ssl-game-controller"]
21+
CMD ["-address", ":8081"]

0 commit comments

Comments
 (0)