1
0
mirror of https://github.com/toby1991/minio-rclone-webdav-server.git synced 2025-04-18 20:04:00 +03:00

initialize

Signed-off-by: Toby Yan <me@tobyan.com>
This commit is contained in:
Toby Yan 2019-07-24 00:41:11 +08:00
parent 8277e32c6f
commit 0b351ee34e
3 changed files with 70 additions and 0 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
############################
# STEP 1 build executable binary
############################
FROM alpine:latest AS builder
ENV RCLONE_VERSION=v1.48.0
WORKDIR /bin/
RUN wget https://github.com/ncw/rclone/releases/download/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip -O ./rclone.zip \
&& unzip ./rclone.zip -d ./ \
&& mv ./rclone-${RCLONE_VERSION}-linux-amd64/rclone ./rclone
############################
# STEP 2 build a small server image
############################
FROM alpine:latest
ENV BUCKET=rclone
ENV AUTH_USER=rclone
ENV AUTH_PASS=rclone123
COPY ./rclone.conf /root/.config/rclone/rclone.conf
COPY --from=builder /bin/rclone /rclone
WORKDIR /
# Run the server binary.
ENTRYPOINT /rclone -v --no-check-certificate serve webdav minio:${BUCKET} --vfs-cache-mode writes --addr :80 --user ${AUTH_USER} --pass ${AUTH_PASS}
EXPOSE 80

35
docker-compose.yaml Normal file
View File

@ -0,0 +1,35 @@
version: "2"
services:
minio:
image: minio/minio:latest
expose:
- "9000"
ports:
- "9000:9000"
volumes:
- ./minio/data:/export
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: miniostorage
command: server /export
restart: always
webdav:
image: toby1991/rclone-webdav:latest
# volumes:
# - ./rclone/rclone.conf:/root/.config/rclone/rclone.conf
environment:
BUCKET: rclone
AUTH_USER: rclone
AUTH_PASS: rclone123
depends_on:
- minio
links:
- minio
expose:
- "80"
ports:
- "80:80"
restart: always

10
rclone.conf Normal file
View File

@ -0,0 +1,10 @@
[minio]
type = s3
provider = Minio
env_auth = false
access_key_id = minio
secret_access_key = miniostorage
region = us-east-1
endpoint = http://minio:9000
location_constraint =
server_side_encryption =