Skip to content

Commit 3fd2135

Browse files
committed
update readme with optional parameters
1 parent 3cda985 commit 3fd2135

File tree

2 files changed

+85
-13
lines changed

2 files changed

+85
-13
lines changed

README.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ TLDR: Multi-arch support is changing from multiple repos to one repo per contain
2626
[![](https://images.microbadger.com/badges/image/linuxserver/duckdns.svg)](https://microbadger.com/images/linuxserver/duckdns "Get your own version badge on microbadger.com")
2727
![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/duckdns.svg)
2828
![Docker Stars](https://img.shields.io/docker/stars/linuxserver/duckdns.svg)
29+
[![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Pipeline-Builders/docker-duckdns/master)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-duckdns/job/master/)
30+
[![](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/duckdns/latest/badge.svg)](https://lsio-ci.ams3.digitaloceanspaces.com/linuxserver/duckdns/latest/index.html)
2931

3032
[Duckdns](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. The service is completely free, and doesn't require reactivation or forum posts to maintain its existence.
3133

@@ -35,6 +37,8 @@ TLDR: Multi-arch support is changing from multiple repos to one repo per contain
3537

3638
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list).
3739

40+
Simply pulling `linuxserver/duckdns` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
41+
3842
The architectures supported by this image are:
3943

4044
| Architecture | Tag |
@@ -43,6 +47,7 @@ The architectures supported by this image are:
4347
| arm64 | arm64v8-latest |
4448
| armhf | arm32v6-latest |
4549

50+
4651
## Usage
4752

4853
Here are some example snippets to help you get started creating a container.
@@ -52,16 +57,17 @@ Here are some example snippets to help you get started creating a container.
5257
```
5358
docker create \
5459
--name=duckdns \
60+
-e PUID=1001 `#optional` \
61+
-e PGID=1001 `#optional` \
5562
-e TZ=Europe/London \
5663
-e SUBDOMAINS=subdomain1,subdomain2 \
5764
-e TOKEN=token \
65+
-e LOG_FILE=false `#optional` \
66+
-v </path/to/appdata/config>:/config `#optional` \
5867
--restart unless-stopped \
5968
linuxserver/duckdns
6069
```
6170

62-
### optional parameters
63-
`-e LOG_FILE=true` if you prefer the duckdns log to be written to a file instead of the docker log
64-
`-v <path to data>:/config` used in conjunction with logging to file
6571

6672
### docker-compose
6773

@@ -75,9 +81,14 @@ services:
7581
image: linuxserver/duckdns
7682
container_name: duckdns
7783
environment:
84+
- PUID=1001 #optional
85+
- PGID=1001 #optional
7886
- TZ=Europe/London
7987
- SUBDOMAINS=subdomain1,subdomain2
8088
- TOKEN=token
89+
- LOG_FILE=false #optional
90+
volumes:
91+
- </path/to/appdata/config>:/config #optional
8192
mem_limit: 4096m
8293
restart: unless-stopped
8394
```
@@ -88,10 +99,28 @@ Container images are configured using parameters passed at runtime (such as thos
8899

89100
| Parameter | Function |
90101
| :----: | --- |
102+
| `-e PUID=1001` | for UserID - see below for explanation |
103+
| `-e PGID=1001` | for GroupID - see below for explanation |
91104
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
92105
| `-e SUBDOMAINS=subdomain1,subdomain2` | multiple subdomains allowed, comma separated, no spaces |
93106
| `-e TOKEN=token` | DuckDNS token |
107+
| `-e LOG_FILE=false` | Set to `true` to log to file (also need to map /config). |
108+
| `-v /config` | Used in conjunction with logging to file. |
109+
110+
## User / Group Identifiers
111+
112+
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
113+
114+
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
94115

116+
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
117+
118+
```
119+
$ id username
120+
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
121+
```
122+
123+
You only need to set the PUID and PGID variables if you are mounting the /config folder
95124

96125
&nbsp;
97126
## Application Setup
@@ -111,8 +140,28 @@ Container images are configured using parameters passed at runtime (such as thos
111140
* image version number
112141
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/duckdns`
113142

143+
## Updating Info
144+
145+
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
146+
147+
Below are the instructions for updating containers:
148+
149+
### Via Docker Run/Create
150+
* Update the image: `docker pull linuxserver/duckdns`
151+
* Stop the running container: `docker stop duckdns`
152+
* Delete the container: `docker rm duckdns`
153+
* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
154+
* Start the new container: `docker start duckdns`
155+
* You can also remove the old dangling images: `docker image prune`
156+
157+
### Via Docker Compose
158+
* Update the image: `docker-compose pull linuxserver/duckdns`
159+
* Let compose update containers as necessary: `docker-compose up -d`
160+
* You can also remove the old dangling images: `docker image prune`
161+
114162
## Versions
115163

164+
* **08.02.19:** - Update readme with optional parameters.
116165
* **10.12.18:** - Fix docker compose example.
117166
* **15.10.18:** - Multi-arch image.
118167
* **22.08.18:** - Rebase to alpine 3.8.

readme-vars.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,47 @@ available_architectures:
1313
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
1414
- { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"}
1515

16+
# development version
17+
development_versions: false
18+
development_versions_items: ""
19+
1620
# container parameters
17-
common_param_env_vars_enabled: false
21+
common_param_env_vars_enabled: 'optional' #PGID, PUID, etc, you can set it to 'optional'
1822
param_container_name: "{{ project_name }}"
19-
param_usage_include_vols: false
20-
param_volumes: ""
21-
param_usage_include_ports: false
22-
param_ports: ""
23+
param_usage_include_net: false #you can set it to 'optional'
24+
param_net: ""
25+
param_net_desc: ""
2326
param_usage_include_env: true
2427
param_env_vars:
2528
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
2629
- { env_var: "SUBDOMAINS", env_value: "subdomain1,subdomain2", desc: "multiple subdomains allowed, comma separated, no spaces"}
2730
- { env_var: "TOKEN", env_value: "token", desc: "DuckDNS token"}
31+
param_usage_include_vols: false
32+
param_volumes: ""
33+
param_usage_include_ports: false
34+
param_ports: ""
35+
param_device_map: false
36+
param_devices: ""
37+
cap_add_param: false
38+
cap_add_param_vars: ""
39+
40+
# optional container parameters
41+
opt_param_usage_include_env: true
42+
opt_param_env_vars:
43+
- { env_var: "LOG_FILE", env_value: "false", desc: "Set to `true` to log to file (also need to map /config)."}
44+
opt_param_usage_include_vols: true
45+
opt_param_volumes:
46+
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Used in conjunction with logging to file." }
47+
opt_param_usage_include_ports: false
48+
opt_param_ports: ""
49+
opt_param_device_map: false
50+
opt_param_devices: ""
51+
opt_cap_add_param: false
52+
opt_cap_add_param_vars: ""
2853

2954
# optional parameters
30-
optional_block_1: true
31-
optional_block_1_items:
32-
- "### optional parameters"
33-
- "`-e LOG_FILE=true` if you prefer the duckdns log to be written to a file instead of the docker log "
34-
- "`-v <path to data>:/config` used in conjunction with logging to file"
55+
optional_block_1: false
56+
optional_block_1_items: ""
3557

3658
# application setup block
3759
app_setup_block_enabled: true
@@ -42,6 +64,7 @@ app_setup_block: |
4264
4365
# changelog
4466
changelogs:
67+
- { date: "08.02.19:", desc: "Update readme with optional parameters." }
4568
- { date: "10.12.18:", desc: "Fix docker compose example." }
4669
- { date: "15.10.18:", desc: "Multi-arch image." }
4770
- { date: "22.08.18:", desc: "Rebase to alpine 3.8." }

0 commit comments

Comments
 (0)