Sign inSign up

chonjay21/webdav

By chonjay21

•Updated about 6 years ago

WebDav based on official latest httpd image

Image
16

50K+

chonjay21/webdav repository overview

⁠WebDav⁠

Docker Cloud Automated build Docker Cloud Build Status Docker Pulls GitHub Docker Stars GitHub stars

⁠WebDav based on official latest httpd image

  • Support Multiple architectures
  • Support Authentication (BasicAuth|DigestAuth)
  • Support SSL(https) with automatically generated self signed certificate
  • Support URL prefix for reverse proxy
  • Support umask change
  • Support UserID|GroupID change
  • Support custom TimeZone
  • Support custom event script override

⁠Who I am

Our goal is to create a simple, consistent, customizable and convenient image using official image

Find me at:


⁠Supported Architectures

The architectures supported by this image are:

ArchitectureTag
x86-64amd64, latest
armhfarm32v7, latest
arm64arm64v8, latest

⁠Usage

Here are some example snippets to help you get started running a container.

⁠docker (simple)

docker run -e APP_USER_NAME=admin -e APP_USER_PASSWD=admin -e APP_UID=1000 -e APP_GID=1000 -p 80:80 -p 443:443 -v /webdav/data:/var/webdav/data chonjay21/webdav

⁠docker

docker run \
  -e APP_USER_NAME=admin	\
  -e APP_USER_PASSWD=admin	\
  -e APP_UID=1000	\
  -e APP_GID=1000	\
  -e APP_UMASK=007                                                `#optional`	\
  -e TZ=America/Los_Angeles                                       `#optional` \
  -e USE_SSL=true                                                 `#optional`	\
  -e FORCE_REINIT_CONFIG=false                                    `#optional` \
  -e SERVER_NAME=WebDav.example.org                               `#optional` \
  -e DIGEST_AUTH_REALM=WebDav                                     `#optional` \
  -e URL_PREFIX=/webdav                                           `#optional` \
  -p 80:80 \
  -p 443:443 \
  -v /webdav/data:/var/webdav/data \
  -v /webdav/config:/webdav/config                                `#optional for persistent data` \
  -v /webdav/server.key:/usr/local/apache2/conf/server.key:ro     `#optional for ssl` \
  -v /webdav/server.crt:/usr/local/apache2/conf/server.crt:ro     `#optional for ssl` \
  chonjay21/webdav

⁠docker-compose

Compatible with docker-compose v2 schemas. (also compatible with docker-compose v3)

version: '2.2'
services:
  webdav:
    container_name: webdav
    image: "chonjay21/webdav:latest"
    ports:
      - 80:80
      - 443:443
    environment:
      - APP_USER_NAME=admin
      - APP_USER_PASSWD=admin
      - APP_UID=1000
      - APP_GID=1000
      - APP_UMASK=007                                                 #optional
      - TZ=America/Los_Angeles                                        #optional
      - USE_SSL=true                                                  #optional
      - FORCE_REINIT_CONFIG=false                                     #optional
      - SERVER_NAME=WebDav.example.org                                #optional
      - DIGEST_AUTH_REALM=WebDav                                      #optional
      - URL_PREFIX=/webdav                                            #optional
    volumes:
      - /webdav/data:/var/webdav/data
      - /webdav/config:/webdav/config                                 #optional
      - /webdav/server.key:/usr/local/apache2/conf/server.key:ro      #optional
      - /webdav/server.crt:/usr/local/apache2/conf/server.crt:ro      #optional

⁠Parameters

ParameterFunctionOptional
-p 80for http port
-p 443for https port
-e APP_USER_NAME=adminfor login username (basic auth)
-e APP_USER_PASSWD=adminfor login password (basic auth)
-e APP_UID=1000for filesystem permission (userid)
-e APP_GID=1000for filesystem permission (groupid)
-e APP_UMASK=007for filesystem file permission umask (default 007)O
-e TZ=America/Los_Angelesfor timezoneO
-e USE_SSL=truefor ssl encryption(https) with automatically created self signed certificateO
-e FORCE_REINIT_CONFIG=falseif true, always reinitialize APP_USER_NAME etc ...O
-e SERVER_NAME=WebDav.example.orgfor apache servername fieldO
-e DIGEST_AUTH_REALM=WebDavfor use DigestAuth(Default BasicAuth)O
-e URL_PREFIX=/webdavfor subpath behind reverse proxyO
-v /var/webdav/datafor data access with this container
-v /webdav/configfor persistent dataO
-v /usr/local/apache2/conf/server.keyfor custom ssl certificateO
-v /usr/local/apache2/conf/server.crtfor custom ssl certificateO

⁠Event scripts

All of our images are support custom event scripts

ScriptFunction
/sources/webdav/eventscripts/on_pre_init.shcalled before initialize container (only for first time)
/sources/webdav/eventscripts/on_post_init.shcalled after initialize container (only for first time)
/sources/webdav/eventscripts/on_run.shcalled before running app (every time)

You can override these scripts for custom logic for example, if you don`t want your password exposed by environment variable, you can override on_pre_init.sh in this manner

⁠Exmaple - on_pre_init.sh

#!/usr/bin/env bash
set -e

APP_USER_PASSWD=mysecretpassword    # or you can set password from secret store and get with curl etc ...

⁠1. Override with volume mount

docker run \
  ...
  -v /webdav/on_pre_init.sh:/sources/webdav/eventscripts/on_pre_init.sh \
  ...
  chonjay21/webdav

⁠2. Override with Dockerfile

FROM chonjay21/webdav:latest
ADD host/on_pre_init.sh /sources/webdav/

⁠Logs to file

  • If you want to httpd logs to file for fail2ban etc, you can use docker command with redirect in this manner.
  • The official httpd driver changes the httpd application’s configuration to write its normal output directly to /proc/self/fd/1 (which is STDOUT) and its errors to /proc/self/fd/2 (which is STDERR)
docker logs --timestamps -f webdav >> access.log 2>&1 &
docker logs --timestamps -f webdav |tee -a access.log &

⁠License

View license information⁠ of this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

⁠License of httpd official image

View license information⁠ of official httpd license

Tag summary

Content type

Image

Digest

Size

65.7 MB

Last updated

about 6 years ago

docker pull chonjay21/webdav