From 4a9b96e5cc8bf822bf3b2860b175f446cb45f98a Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Fri, 1 Jun 2018 19:33:11 +0100 Subject: Implemented animated GIFs --- Dockerfile | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'Dockerfile') 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 -- cgit v1.2.3-ZIG