aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-06-02 09:46:43 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-06-02 09:46:43 +0100
commit4a353d95f6d2dd8a9841bdae6f0721f5b014599e (patch)
treec0f039c5e7711d1163f641117b8f5548ab8d282f /Dockerfile
parent76180c302197e83a257b975394768e5affa4054e (diff)
parent4a9b96e5cc8bf822bf3b2860b175f446cb45f98a (diff)
downloadunicornpaint-4a353d95f6d2dd8a9841bdae6f0721f5b014599e.tar.gz
unicornpaint-4a353d95f6d2dd8a9841bdae6f0721f5b014599e.tar.bz2
unicornpaint-4a353d95f6d2dd8a9841bdae6f0721f5b014599e.tar.xz
unicornpaint-4a353d95f6d2dd8a9841bdae6f0721f5b014599e.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 19 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index 156e3f8..2d65ee5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,21 @@
FROM golang:alpine
-RUN apk update && apk add git
-RUN go get github.com/ecc1/spi
-RUN go get github.com/gorilla/websocket
-RUN go get github.com/MFAshby/unicornpaint/unicorn
-COPY build/ build/
-COPY Server.go ./
-RUN go build -o ./unicornpaint Server.go
+# Add tools for downloading & building
+RUN apk add --update git nodejs nodejs-npm
+
+# Copy everything across
+COPY . ./
+
+# Build the website
+RUN npm install && npm run-script build
+
+# Retrieve server dependencies
+RUN go get github.com/ecc1/spi github.com/gorilla/websocket github.com/MFAshby/unicornpaint/unicorn
+
+# Build server
+RUN go build -o ./unicornpaint Server2.go
+
+# Get rid of stuff we don't need for runtime
+RUN apk del git nodejs nodejs-npm
+
+# Run server!
CMD ./unicornpaint