Skip to content

Commit

Permalink
chore: update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaswx authored Jul 12, 2021
1 parent 17511db commit 9cb8b44
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# manjaro-package-mirror
Docker container which mirrors manjaro packages and serves them via nginx

This image is based on the alpine image and uses rsync to synchronize the packages and nginx to deliver them

## Supported Architectures
The image is built for the **amd64** and **arm64** platform and is available in the **DockerHub** and the **Github Container Registry** respectively.

## Parameters
A container can be started with various parameters to make changes to the default configuration, expose ports, and persist data. For example, `-p 8080:80` would expose port 80 inside the container for access from outside via port 8080. The following parameters are available for this image:

| Parameter | Function |
| -------------------------------------------------------------------- | ----------------------------------------------------------- |
| `-p 8080:80` | Binds container port 80 to host port 8080 |
| `-v /path/to/storage:/srv/http/manjaro` | Persists the package repository data under /path/to/storage |
| `-e SOURCE_MIRROR=rsync://mirrorservice.org/repo.manjaro.org/repos/` | Allows to use another mirror for synchronization |
| `-e SLEEP=6h` | Adjusts the pause time between synchronizations |

## Usage
The container can be started either with `docker run` or `docker-compose`

**Please make sure to choose a suitable directory for persistence before running the container and replace the placeholder "/path/to/storage" chosen here with it.**

### docker-compose (recommended)
````yaml
---
version: "3.4"
services:
manjaro-mirror:
container_name: manjaro-mirror
image: ghcr.io/twiese99/manjaro-package-mirror
volumes:
- /path/to/storage:/srv/http/manjaro
ports:
- 8080:80
restart: unless-stopped
````

### docker run
````bash
docker run -d \
--name=manjaro-mirror \
-p 8080:80 \
-v /path/to/storage:/srv/http/manjaro \
--restart unless-stopped \
ghcr.io/twiese99/manjaro-package-mirror
````




0 comments on commit 9cb8b44

Please sign in to comment.