Dockerfile (502B)
1 FROM golang:alpine 2 # Add tools for downloading & building 3 RUN apk add --update git nodejs nodejs-npm 4 5 # Copy everything across 6 COPY . ./ 7 8 # Build the website 9 RUN npm install && npm run-script build 10 11 # Retrieve server dependencies 12 RUN go get github.com/ecc1/spi github.com/gorilla/websocket github.com/MFAshby/unicornpaint/unicorn 13 14 # Build server 15 RUN go build -o ./unicornpaint Server2.go 16 17 # Get rid of stuff we don't need for runtime 18 RUN apk del git nodejs nodejs-npm 19 20 # Run server! 21 CMD ./unicornpaint