An open API service indexing awesome lists of open source software.

https://github.com/aguslr/docker-apache-dav

Set up Apache HTTP server to share files via WebDAV
https://github.com/aguslr/docker-apache-dav

apache docker httpd podman webdav

Last synced: 7 months ago
JSON representation

Set up Apache HTTP server to share files via WebDAV

Awesome Lists containing this project

README

          

[aguslr/docker-apache-dav][1]
=============================

[![docker-pulls](https://img.shields.io/docker/pulls/aguslr/apache-dav)](https://hub.docker.com/r/aguslr/apache-dav) [![image-size](https://img.shields.io/docker/image-size/aguslr/apache-dav/latest)](https://hub.docker.com/r/aguslr/apache-dav)

This *Docker* image sets up *Apache*'s [WebDAV][3] inside a docker container.

> **[Apache][2]** 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_`.

| Variable | Function | Default | Required |
| :------- | :-------------------- | :------------ | -------- |
| `USER` | Username of HTTP user | `httpuser` | N |
| `PASS` | Password of HTTP user | autogenerated | N |

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

docker logs | grep '^Password'

### Custom Apache configuration

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



Require valid-user

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

[1]: https://github.com/aguslr/docker-apache-dav
[2]: https://httpd.apache.org/
[3]: https://en.wikipedia.org/wiki/WebDAV