From e846c16336b5008e55a8e8a5f61ca008bf21046e 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 Former-commit-id: 02381af5eb56c6d17416b187abac0c5b0067179b [formerly 4ee41157924a7ebbeefd31ddd55919317da6a4fe] [formerly 914325aefc9c3f622b3368289f3499c526943b56 [formerly 02c98905ae7c72394c3718afbbc0f2b315e8496f]] Former-commit-id: 5c9112505577abeb82bb0e9f6f04081b63838dbf [formerly 82821dd7c2a3bd04d11148b43c45cbd8331e7138] Former-commit-id: 121ad025499afafc25ca21e322783aa91ac6ebf2 --- 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"]