Skip to content

Commit 5599a14

Browse files
committed
Added a multistage-build Dockerfile and bumped version number
1 parent c9cf298 commit 5599a14

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,10 @@ typings
4949
*.workspace
5050
.codelite
5151

52-
# public/js/client.js (it gets built)(but needs to be included for docker)
53-
# public/js/client.js
52+
# public/js/client.js (it gets built, and no longer needs to be included for docker)
53+
public/js/client.js
54+
55+
# public/...xterm files
56+
public/js/xterm.js
57+
public/css/xterm.css
58+

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:6.11-alpine AS nodebuilder
2+
RUN apk update && apk add git
3+
WORKDIR /root/vdc
4+
COPY client/ client/
5+
COPY public/ public/
6+
COPY package.json package.json
7+
RUN npm install && npm run build-public && npm run build-client-debug
8+
9+
FROM golang:1.8.3-alpine AS gobuilder
10+
COPY server/server.go /go/src/github.com/rajch/voxel-dockerclient/server/
11+
WORKDIR /go/src/github.com/rajch/voxel-dockerclient/server/
12+
RUN CGO_ENABLED='0' go build
13+
14+
FROM scratch
15+
COPY --from=gobuilder /go/src/github.com/rajch/voxel-dockerclient/server/server /server/server
16+
COPY --from=nodebuilder /root/vdc/public/ public/
17+
ENTRYPOINT ["/server/server"]
18+
EXPOSE 80

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "voxel-dockerclient",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "An experimental minecraft-like docker client, built using voxel.js.",
55
"main": "server.js",
66
"scripts": {

0 commit comments

Comments
 (0)