Browse Source

Add Dockerfile and docker image build script

pull/188/head
Robert Swain 7 years ago
parent
commit
c34b32647a
  1. 10
      Dockerfile
  2. 12
      build-docker-image.sh

10
Dockerfile

@ -0,0 +1,10 @@
FROM alpine:3.6
ENV BIND_ADDRESS=:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=/data/go-neb.db?_busy_timeout=5000
COPY bin/go-neb /go-neb
VOLUME /data
EXPOSE 4050
ENTRYPOINT ["/go-neb"]

12
build-docker-image.sh

@ -0,0 +1,12 @@
#!/bin/bash
set -e
docker run \
--rm \
-v "$PWD":/usr/src/myapp \
-w /usr/src/myapp \
golang:1.8-alpine \
sh -c 'apk add --no-cache git gcc musl-dev && go get -u github.com/constabulary/gb/... && gb build -f github.com/matrix-org/go-neb'
docker build -t ${IMAGE_PREFIX}go-neb:latest .
Loading…
Cancel
Save