Dockerify dave

This commit is contained in:
Martin Pizala 2018-05-18 20:55:58 +02:00
parent 1eb5bd991c
commit 4672604cc0
No known key found for this signature in database
GPG key ID: 50F0D0CE74400C95
4 changed files with 36 additions and 1 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
**

10
Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM golang:alpine
RUN apk add --no-cache git
RUN go get -u github.com/micromata/dave/cmd/...
FROM alpine:latest
RUN apk update && apk upgrade
RUN adduser -S dave
COPY --from=0 /go/bin/dave /usr/local/bin
USER dave
ENTRYPOINT ["/usr/local/bin/dave"]

View file

@ -209,6 +209,30 @@ Now you can call `mage install` to build and install the binaries. If you just c
install Installs dave and davecli to your $GOPATH/bin folder
installDeps Runs dep ensure and installs additional dependencies.
### Build and run with Docker
Building dave with Docker is simple
git clone git@github.com:micromata/dave.git
cd dave
docker build -t dave .
Let dave run
# create webdav home
mkdir webdav-home
docker run -d \
-p 8000:8000 \
-v $(pwd)/examples/config-sample.yaml:/config.yaml:ro \
-v $(pwd)/webdav-home:/tmp:rw \
dave
To export the static binary simply run
docker run --rm --entrypoint="" dave cat /usr/local/bin/dave > dave
chmod u+x dave
## Connecting
You could simply connect to the webdav server with a http(s) connection and a tool that allows the webdav protocol.

View file

@ -55,4 +55,4 @@ users:
# create: false
# read: false
# update: false
# delete: falst
# delete: false