boringcat / docker-caddy2-webdav Goto Github PK
View Code? Open in Web Editor NEWwebdav base on caddy2
webdav base on caddy2
Dockerfile 文件
FROM alpine:latest
RUN set -xe\
&& mkdir -p /usr/local/sbin\
&& wget https://caddyserver.com/api/download\?os\=linux\&arch\=amd64\&p\=github.com%2Fmholt%2Fcaddy-webdav -O /usr/local/sbin/caddy\
&& chmod +x /usr/local/sbin/caddy\
&& mkdir /tmp/caddy\
&& chmod 777 /tmp/caddy
ENV WEBDAV_ROOT="/www"\
WEBDAY_PREFIX=""
COPY docker-entrypoint.sh /usr/local/sbin/entrypoint.sh
VOLUME [ "/www", "/tmp/caddy" ]
EXPOSE 80
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]
执行 docker build -t boringcat/caddy2-webdav .
docker-compose.yml 文件
version: "2"
services:
webdav:
image: boringcat/caddy2-webdav
restart: unless-stopped
container_name: webdav
network_mode: bridge
user: "root:root"
environment:
WEBDAV_PORT: 5005
WEBDAV_USERNAME: boringcat
WEBDAV_PASSWORD: "!n*&3#V5^&!w#^"
WEBDAV_ALLOWIP: "192.168.0.0/16 fe80::/64"
volumes:
- /root:/www
ports:
- 5005:5005
执行 docker-compose up
报错
WARN[0000] /root/project/docker-caddy2-webdav/docker-compose.yml: `version` is obsolete
[+] Running 1/0
✔ Container webdav Created 0.1s
Attaching to webdav
webdav | *************** Caddyfile ***************
webdav | {
webdav | auto_https off
webdav | admin unix//tmp/caddy/admin.sock
webdav | }
webdav | (webdavconf) {
webdav | log {
webdav | output stderr
webdav | }
webdav | @allow {
webdav | remote_ip 192.168.0.0/16 fe80::/64
webdav | }
webdav | respond "403 Forbidden" 403 {
webdav | close
webdav | }
webdav | route @allow {
webdav | root * /www
webdav | basicauth / {
webdav | "boringcat" "$2a$14$gE1fi8Tghnafpw2WqiXvbOrHXc6IP2rOg3qKHwEAbh0l4vq2X/hUq"
webdav | }
webdav | webdav
webdav | }
webdav | }
webdav | http://:5005 {
webdav | import webdavconf
webdav | }
webdav | ****************************************
webdav | Error: reading config from file: open onfig: no such file or directory
webdav exited with code 0
帮帮忙吧,四处碰壁。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.