aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-06-01 19:33:11 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-06-01 19:33:11 +0100
commit4a9b96e5cc8bf822bf3b2860b175f446cb45f98a (patch)
treecff24b438803874ae6704703461b71147125d454 /Dockerfile
parent5afaaf0432d4c9b6c2d840492eff184af41c961e (diff)
downloadunicornpaint-4a9b96e5cc8bf822bf3b2860b175f446cb45f98a.tar.gz
unicornpaint-4a9b96e5cc8bf822bf3b2860b175f446cb45f98a.tar.bz2
unicornpaint-4a9b96e5cc8bf822bf3b2860b175f446cb45f98a.tar.xz
unicornpaint-4a9b96e5cc8bf822bf3b2860b175f446cb45f98a.zip
Implemented animated GIFs
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