From 02c98905ae7c72394c3718afbbc0f2b315e8496f Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 27 Jul 2017 14:03:53 +0100 Subject: [PATCH] Add Docker.json and update Dockerfile. See #157 --- Docker.json | 10 ++++++++++ Dockerfile | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 Docker.json diff --git a/Docker.json b/Docker.json new file mode 100644 index 00000000..7319c940 --- /dev/null +++ b/Docker.json @@ -0,0 +1,10 @@ +{ + "port": 80, + "address": "", + "database": "/etc/database.db", + "scope": "/srv", + "allowCommands": true, + "allowEdit": true, + "allowNew": true, + "commands": [] +} diff --git a/Dockerfile b/Dockerfile index a2d5182d..3da129fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,18 @@ FROM golang:alpine + COPY . /go/src/github.com/hacdias/filemanager + WORKDIR /go/src/github.com/hacdias/filemanager RUN apk add --no-cache git RUN go get ./... + WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager -RUN go build -ENTRYPOINT ["/go/src/github.com/hacdias/filemanager/cmd/filemanager/filemanager"] -CMD ["-h"] +RUN go install + +VOLUME /srv +EXPOSE 80 + +COPY Docker.json /etc/config.json + +ENTRYPOINT ["/go/bin/filemanager"] +CMD ["--config", "/etc/config.json"]