Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang

RUN \
apt update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
libmpv-dev \
python-pip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN \
pip install --no-cache youtube-dl \
&& youtube-dl --version

WORKDIR ${GOPATH}/src/github.com/aykevl/plaincast/
COPY . ${GOPATH}/src/github.com/aykevl/plaincast/

RUN go get -v .
RUN go install -i .

ENTRYPOINT [ "plaincast" ]
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,20 @@ Or for Python 3:
$ sudo pip3 install --upgrade youtube-dl

It is advisable to run this regularly as it has to keep up with YouTube updates.
Certainly first try updating youtube-dl when plaincast stops working.
Certainly first try updating `youtube-dl` when plaincast stops working.

## Docker

Both `Dockerfile` and Docker Compose manifest are provided. The former builds
a Docker image with the program binary built from local code and the required
build dependencies. The Docker image also includes a recent `youtube-dl`
version. This will avoid the need of installing a recent version for the local
OS and version on the host, thus avoiding the risks of installing any software.
The [Docker Compose manifest](./docker-compose.yml) contains the configuration
settings needed to launch a Docker container.
To run the Docker image, just run:

$ docker-compose up --build --force-recreate

## Known issues

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "2.4"
services:
plaincast:
container_name: plaincast
restart: unless-stopped
build: .
environment:
- ALSA_CARD
network_mode: host
devices:
- /dev/snd