Add Docker.json and update Dockerfile. See #157

This commit is contained in:
Henrique Dias 2017-07-27 14:03:53 +01:00
parent 9453e22559
commit 02c98905ae
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
2 changed files with 22 additions and 3 deletions

10
Docker.json Normal file
View File

@ -0,0 +1,10 @@
{
"port": 80,
"address": "",
"database": "/etc/database.db",
"scope": "/srv",
"allowCommands": true,
"allowEdit": true,
"allowNew": true,
"commands": []
}

View File

@ -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"]