Dockerify dave
This commit is contained in:
parent
1eb5bd991c
commit
4672604cc0
4 changed files with 36 additions and 1 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
**
|
10
Dockerfile
Normal file
10
Dockerfile
Normal 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"]
|
24
Readme.md
24
Readme.md
|
@ -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
|
install Installs dave and davecli to your $GOPATH/bin folder
|
||||||
installDeps Runs dep ensure and installs additional dependencies.
|
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
|
## Connecting
|
||||||
|
|
||||||
You could simply connect to the webdav server with a http(s) connection and a tool that allows the webdav protocol.
|
You could simply connect to the webdav server with a http(s) connection and a tool that allows the webdav protocol.
|
||||||
|
|
|
@ -55,4 +55,4 @@ users:
|
||||||
# create: false
|
# create: false
|
||||||
# read: false
|
# read: false
|
||||||
# update: false
|
# update: false
|
||||||
# delete: falst
|
# delete: false
|
||||||
|
|
Loading…
Reference in a new issue