Add Docker.json and update Dockerfile. See #157

Former-commit-id: 02381af5eb56c6d17416b187abac0c5b0067179b [formerly 4ee41157924a7ebbeefd31ddd55919317da6a4fe] [formerly 914325aefc9c3f622b3368289f3499c526943b56 [formerly 02c98905ae]]
Former-commit-id: 5c9112505577abeb82bb0e9f6f04081b63838dbf [formerly 82821dd7c2a3bd04d11148b43c45cbd8331e7138]
Former-commit-id: 121ad025499afafc25ca21e322783aa91ac6ebf2
pull/726/head
Henrique Dias 2017-07-27 14:03:53 +01:00
parent dde01c6931
commit e846c16336
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"]