Giter Club home page Giter Club logo

docker-caddy2-webdav's Issues

Error: reading config from file: open onfig: no such file or directory

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

帮帮忙吧,四处碰壁。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.