Docker - WebDAV Container Setup


Here I describe my setup of the WebDAV container.

I run this Docker container on a Ubuntu VM that runs via [[ Proxmox VE ]]. I perform the following on the CLI.

Docker pull command:

docker pull jgeusebroek/webdav

Within my home folder I have created a Docker folder where I create a subfolder for each container:

cd ~
mkdir -p docker/webdav
cd docker/webdav

Also create a folder where the WebDAV data can be saved:

mkdir data

I use the Nano text editor to create a shell script:

sudo nano webdav_run.sh

With this shell script we are going to create the container. Copy the following into webdav_run.sh:

IDu=$(id -u $(logname)) # Saves the logged in user id in the IDu variable
IDg=$(id -g $(logname)) # Saves the logged in user group in the IDg variable

docker run -d \
 -p 0.0.0.0:873:80 \
 --hostname=webdav \
 --name=webdav \
 -v $PWD/data:/webdav \
 -e 'TZ=Europe/Amsterdam' \
 -e USER_UID=$IDu \
 -e USER_GID=$IDg \
 -e WHITELIST='192.168.1.*|172.16.1.*' \
 -e READWRITE=true \
 jgeusebroek/webdav

If necessary, adjust the following:

-p 0.0.0.0:873:80
Choose a port that is still available, I chose 873. Check this with netstat

-v $PWD/data:/webdav
Choose the location for the WebDAV data. In this example it is the data map we created

-e ‘TZ=Europe/Amsterdam’
Pick the right timezone

-e WHITELIST=’192.168.1.|172.16.1.‘
Optionally adapt to other local IP ranges that use WebDAV

Exit Nano (CTRL-X) and save the changes.

Now create the container:

sudo sh webdav_run.sh

Check if the container is running properly.

See also my notes about updating containers with Portainer or via the CLI. With Synology’s Docker Application, updating a container is also very easy.


Read other notes

Comments

    No comments found for this note.

    Join the discussion for this note on this ticket. Comments appear on this page instantly.

    Tags


    Notes mentioning this note


    Notes Graph