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
- Host: GitHub
- URL: https://github.com/aguslr/docker-apache-dav
- Owner: aguslr
- License: gpl-3.0
- Created: 2023-04-28T14:52:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T10:13:26.000Z (almost 2 years ago)
- Last Synced: 2025-01-24T06:28:50.957Z (about 1 year ago)
- Topics: apache, docker, httpd, podman, webdav
- Language: Shell
- Homepage:
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[aguslr/docker-apache-dav][1]
=============================
[](https://hub.docker.com/r/aguslr/apache-dav) [](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