Thanks to visit codestin.com
Credit goes to hub.docker.com

aguslr/apache-dav

By aguslr

Updated 11 days ago

Set up Apache HTTP server to share files via WebDAV

Image
1

9.9K

aguslr/apache-dav repository overview

aguslr/docker-apache-dav

docker-pulls image-size

This Docker image sets up Apache's WebDAV inside a docker container.

Apache is an open-source HTTP server for modern operating systems including UNIX and Windows.

Installation

To use docker-apache-dav, follow these steps:

  1. Clone and start the container:

    docker run -p 80:80 \
      -e HTTP_USER=bob \
      -e HTTP_PASS=123456 \
      -v "${PWD}"/data:/data \
      docker.io/aguslr/apache-dav:latest
    
  2. Configure your Web browser to connect to your Apache server's IP address and login with user HTTP_USER.

Variables

The image is configured using environment variables passed at runtime. All these variables are prefixed by HTTP_.

VariableFunctionDefaultRequired
USERUsername of HTTP userhttpuserN
PASSPassword of HTTP userautogeneratedN

To see the default autogenerated password, check the log for the container:

docker logs <container_name> | grep '^Password'
Custom Apache configuration

If we want to customize Apache we can add these customizations to a custom.conf file:

<Directory "/data/Public">
    <LimitExcept GET PROPFIND OPTIONS HEAD>
       Require valid-user
    </LimitExcept>
</Directory>

Then we can go ahead and mount it as follows:

docker run -p 80:80 \
  -e HTTP_USER=bob \
  -e HTTP_PASS=123456 \
  -v "${PWD}"/data:/data \
  -v "${PWD}"/custom.conf:/etc/apache2/dav.d/custom.conf \
  docker.io/aguslr/apache-dav:latest

Build locally

Instead of pulling the image from a remote repository, you can build it locally:

  1. Clone the repository:

    git clone https://github.com/aguslr/docker-apache-dav.git
    
  2. Change into the newly created directory and use docker-compose to build and launch the container:

    cd docker-apache-dav && docker-compose up --build -d
    

Tag summary

Content type

Image

Digest

sha256:9898c5fed

Size

50 MB

Last updated

11 days ago

docker pull aguslr/apache-dav:sha-4f93783