Sign inSign up

loganmarchione/docker-webdav-nginx

By loganmarchione

•Updated 6 days ago

Image
6

50K+

loganmarchione/docker-webdav-nginx repository overview

⁠docker-webdav-nginx

CI/CD Docker Image Size (latest semver)

Runs a Nginx WebDav server in Docker

⁠Explanation

  • Runs a Nginx WebDav server in Docker.
  • Exposes two WebDav locations
    • http://localhost/public - No authentication
    • http://localhost/restricted - Authentication if specified (see below)

⁠Requirements

  • Requires a WebDav client.
  • I've found that not all clients are compatible (e.g., for me, Dolphin doesn't work, but Thunar does).
  • I prefer to use Docker volumes⁠ for storage, as bind mounts⁠ might cause permissions issues when creating the required directories.

⁠Docker image information

⁠Docker image tags
  • latest: Latest version
  • X.X.X: Semantic version⁠ (use if you want to stick on a specific version)
⁠Environment variables
VariableRequired?DefinitionExampleComments
WEBDAV_USERSNoComma-separated list of usernames/passwords, where each user-password pair is separated by a colonuser1:password1,user2:password2Usernames/passwords cannot contain commas , or colons : and all users share the same location for files (i.e., /restricted)
NGINX_CLIENT_MAX_BODY_SIZENo (default: 250M)Nginx's client_max_body_size⁠500MBe sure to include the units. Set to 0 to disable.
⁠Ports
Port on hostPort in containerComments
Choose at your discretion80Nginx
⁠Volumes
Volume on hostVolume in containerComments
Choose at your discretion/var/www/webdavUsed to store WebDav files
⁠Example usage

Below is an example docker-compose.yml file.

version: '3'
services:
  webdav:
    container_name: docker-webdav-nginx
    restart: unless-stopped
    environment:
      - WEBDAV_USERS=user1:password1,user2:password2
      - NGINX_CLIENT_MAX_BODY_SIZE=500M
    networks:
      - webdav
    ports:
      - '8888:80'
    volumes:
      - 'webdav:/var/www/webdav'
    image: loganmarchione/docker-webdav-nginx:latest

networks:
  webdav:

volumes:
  webdav:
    driver: local
⁠Debugging only

Below is an example of running locally (used to edit/test/debug).

# Build the Dockerfile
docker compose -f docker-compose-dev.yml up -d

# View logs
docker compose -f docker-compose-dev.yml logs -f

# Destroy when done
docker compose -f docker-compose-dev.yml down

Tag summary

Content type

Image

Digest

sha256:05ecc2d68…

Size

61.8 MB

Last updated

6 days ago

docker pull loganmarchione/docker-webdav-nginx