mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-10-30 16:35:48 +01:00
tidy up Dockerfile, init and services files spruce up README
This commit is contained in:
@@ -6,9 +6,9 @@ RUN \
|
||||
apk add --no-cache \
|
||||
transmission-daemon
|
||||
|
||||
# add local files
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
||||
# Volumes and Ports
|
||||
VOLUME /config /downloads /watch
|
||||
# ports and volumes
|
||||
EXPOSE 9091 51413
|
||||
VOLUME /config /downloads /watch
|
||||
|
||||
25
README.md
25
README.md
@@ -1,6 +1,9 @@
|
||||

|
||||

|
||||
|
||||
The [LinuxServer.io](https://www.linuxserver.io/) team brings you another quality container release featuring easy user mapping and community support. Be sure to checkout our [forums](https://forum.linuxserver.io/index.php) or for real-time support our [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`.
|
||||
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring easy user mapping and community support. Find us for support at:
|
||||
* [forum.linuxserver.io](https://forum.linuxserver.io)
|
||||
* [IRC](https://www.linuxserver.io/index.php/irc/) on freenode at `#linuxserver.io`
|
||||
* [Podcast](https://www.linuxserver.io/index.php/category/podcast/) covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
|
||||
|
||||
# linuxserver/transmission
|
||||
|
||||
@@ -10,12 +13,13 @@ Transmission is designed for easy, powerful use. Transmission has the features y
|
||||
|
||||
```
|
||||
docker create --name=transmission \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-v <path to data>:/config \
|
||||
-v <path to downloads>:/downloads \
|
||||
-v <path to watch folder>:/watch \
|
||||
-e PGID=<gid> -e PUID=<uid> \
|
||||
-p 9091:9091 -p 51413:51413 -p 51413:51413/udp \
|
||||
-e TZ=<timezone> \
|
||||
-p 9091:9091 -p 51413:51413 \
|
||||
-p 51413:51413/udp \
|
||||
linuxserver/transmission
|
||||
```
|
||||
|
||||
@@ -23,20 +27,25 @@ linuxserver/transmission
|
||||
|
||||
* `-p 9091`
|
||||
* `-p 51413` - the port(s)
|
||||
* `-v /etc/localtime` for timesync - *optional*
|
||||
* `-v /config` - where transmission should store config files and logs
|
||||
* `-v /downloads` - local path for downloads
|
||||
* `-v /watch` - watch folder for torrent files
|
||||
* `-e PGID` for GroupID - see below for explanation
|
||||
* `-e PUID` for UserID - see below for explanation
|
||||
* `-e TZ` for timezone information, eg Europe/London
|
||||
|
||||
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it transmission /bin/bash`.
|
||||
|
||||
### User / Group Identifiers
|
||||
|
||||
**TL;DR** - The `PGID` and `PUID` values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended).
|
||||
Sometimes when using data 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`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
|
||||
|
||||
Part of what makes our containers work so well is by allowing you to specify your own `PUID` and `PGID`. This avoids nasty permissions errors with relation to data volumes (`-v` flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers.
|
||||
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
|
||||
|
||||
```
|
||||
$ id <dockeruser>
|
||||
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
||||
```
|
||||
|
||||
## Setting up the application
|
||||
|
||||
@@ -50,7 +59,7 @@ Webui is on port 9091, the settings.json file in /config has extra settings not
|
||||
|
||||
|
||||
## Versions
|
||||
+ **01.07.16:** Rebase to alpine for smaller image size.
|
||||
+ **09.08.16:** Rebase to alpine linux.
|
||||
+ **06.12.15:** Separate mapping for watch folder.
|
||||
+ **16.11.15:** Initial Release.
|
||||
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
mkdir -p /downloads/{complete,incomplete} /watch
|
||||
# make folders
|
||||
mkdir -p \
|
||||
/downloads/{complete,incomplete} /watch
|
||||
|
||||
[[ ! -f /config/settings.json ]] && cp /defaults/settings.json /config/settings.json
|
||||
# copy config
|
||||
[[ ! -f /config/settings.json ]] && cp \
|
||||
/defaults/settings.json /config/settings.json
|
||||
|
||||
chown abc:abc /watch /config/settings.json /downloads /downloads/incomplete /downloads/complete
|
||||
# permissions
|
||||
chown abc:abc \
|
||||
/config/settings.json \
|
||||
/downloads \
|
||||
/downloads/complete \
|
||||
/downloads/incomplete \
|
||||
/watch
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
s6-setuidgid abc /usr/bin/transmission-daemon -g /config -c /watch -f
|
||||
exec \
|
||||
s6-setuidgid abc /usr/bin/transmission-daemon \
|
||||
-g /config -c /watch -f
|
||||
|
||||
Reference in New Issue
Block a user