Wrap the cli script in a docker container (#17)

* README Changes

* amend

* Add the Dockerfile
This commit is contained in:
Kevin Halpin 2019-01-07 16:22:25 -07:00 committed by pyed
parent c01767d342
commit 576279cfe8
3 changed files with 60 additions and 2 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
# ignore .git and .cache folders
.git
README.md

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM alpine:latest as certs
RUN apk --update add ca-certificates
FROM bash:latest
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY transmission-telegram /
RUN chmod 777 transmission-telegram
ENTRYPOINT ["/transmission-telegram"]

View File

@ -4,7 +4,9 @@
<img src="https://raw.github.com/pyed/transmission-telegram/master/demo.gif" width="400" />
## Install
## CLI
### Install
Just [download](https://github.com/pyed/transmission-telegram/releases) the appropriate binary for your OS, place `transmission-telegram` in your `$PATH` and you are good to go.
@ -12,4 +14,48 @@ Or if you have `Go` installed: `go get -u github.com/pyed/transmission-telegram`
## Usage
[Wiki](https://github.com/pyed/transmission-telegram/wiki)
[Wiki](https://github.com/pyed/transmission-telegram/wiki)
## Docker Alternate Installation Route
### Standalone
```
docker run -d --name transmission-telegram \
kevinhalpin/transmission-telegram:latest \
-token=<Your Bot Token> \
-master=<Your Username> \
-url=<Transmission RPC> \
-username=<Transmission If Needed> \
-password=<Transmissions If Needed>
```
### docker-compose Example
```
version: '2.4'
services:
transmission:
container_name: transmission
environment:
- PUID=${PUID_DOCKUSER}
- PGID=${PGID_APPZ}
image: linuxserver/transmission
network_mode: 'host'
hostname: 'transmission'
volumes:
- ${CONFIG}/transmission:/config
- ${DATA}/transmission/downloads:/downloads
telegram-transmission-bot:
container_name: telegram-transmission-bot
restart: on-failure
depends_on:
- transmission
- plex
- emby
network_mode: 'host'
image: kevinhalpin/transmission-telegram:latest
command: '-token=${TELEGRAM_TRANSMISSION_BOT} -master=${TELEGRAM_USERNAME} -url=${TRANSMISSION_URL} - username=${TRANSMISSION_USERNAME} -password=${PASS}'
```