Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
phnzb committed Nov 7, 2023
1 parent 02ba770 commit 1b436f5
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- develop
- main
- feature/docker
tags:
- v*

jobs:
build:
Expand Down Expand Up @@ -55,9 +57,17 @@ jobs:
uses: docker/build-push-action@v5
with:
context: docker
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.gen_tags.outputs.tags }}
build-args: |
"NZBGET_RELEASE=${{ github.ref_name }}"
"MAKE_JOBS=2"
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: nzbgetcom/nzbget
readme-filepath: ./docker/README.md
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![linux build](https://github.com/nzbgetcom/nzbget/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/nzbgetcom/nzbget/actions/workflows/linux.yml)
[![windows build](https://github.com/nzbgetcom/nzbget/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/nzbgetcom/nzbget/actions/workflows/windows.yml)
[![osx build](https://github.com/nzbgetcom/nzbget/actions/workflows/osx.yml/badge.svg)](https://github.com/nzbgetcom/nzbget/actions/workflows/osx.yml)
[![docker build](https://github.com/nzbgetcom/nzbget/actions/workflows/docker.yml/badge.svg)](https://github.com/nzbgetcom/nzbget/actions/workflows/docker.yml)


![Contributions welcome](https://img.shields.io/badge/contributions-welcome-blue.svg)
Expand Down
103 changes: 103 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
![NZBGet logo](https://nzbget.com/img/logo.svg)

# Official NZBGet builds from [nzbgetcom/nzbget](https://github.com/nzbgetcom/nzbget) repository

NZBGet is an efficient, open-source Usenet software designed for downloading binary content from Usenet newsgroups.

# Supported Architectures

| Architecture | Tag
|:-------------|-
| x86-64 | amd64-\<version tag\>
| arm64 | arm64v8-\<version tag\>
| armhf | arm32v7-\<version tag\>

# Version Tags

| Tag | Description
|:-------------|-
| latest | Stable nzbget releases (from `main` repository branch)
| testing | Development nzbget builds (from `develop` repository branch)
| v* | Version-specific release builds (like v22.0 for 22.0 nzbget release)

# Usage

[docker-compose](https://docs.docker.com/compose/) (recommended)
```
---
version: "2.1"
services:
nzbget:
image: nzbgetcom/nzbget:latest
container_name: nzbget
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- NZBGET_USER=nzbget #optional
- NZBGET_PASS=tegbzn6789 #optional
volumes:
- /path/to/config:/config
- /path/to/downloads:/downloads #optional
ports:
- 6789:6789
restart: unless-stopped
```

[docker cli](https://docs.docker.com/engine/reference/commandline/cli/)
```
docker run -d \
--name=nzbget \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e NZBGET_USER=nzbget `#optional` \
-e NZBGET_PASS=tegbzn6789 `#optional` \
-p 6789:6789 \
-v /path/to/config:/config \
-v /path/to/downloads:/downloads `#optional` \
--restart unless-stopped \
nzbgetcom/nzbget:latest
```

# Supported environment variables

NZBGet container can be configured by passing environment variables to it. This can be done in docker-compose mode by specifying `environment:` and in cli mode by using -e switch.

| Parameter | Description
|:------------|-
| PUID | UserID (see below)
| PGID | GroupID (see below)
| TZ | Timezone
| NZBGET_USER | User name for web auth
| NZBGET_PASS | Password for web auth

# User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this problem we allow to specify the user PUID and group PGID.

The example above uses PUID=1000 and PGID=1000. To find the required ids, run `id user`:
```
$ id user
uid=1000(user) gid=1000(users) groups=1000(users)
```

# Building locally

For development purposes can be used Dockerfile or docker-compose file from official repository (`docker` folder):

```
git clone https://github.com/nzbgetcom/nzbget.git
cd docker
docker compose up
-or-
docker build . -t nzbget-local
```

Dockerfile supports next build arguments:

| Argument | Description
|:----------------|-
| NZBGET_RELEASE | Branch name or tag to build from
| UNRAR_VERSION | Unrar version
| MAKE_JOBS | Number of make jobs for speed up build

0 comments on commit 1b436f5

Please sign in to comment.