0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rune AudioでRadikoを聴く(Dockerへ移行)

Last updated at Posted at 2025-03-11

Rune AudioでRadikoを聴く が、いつの間にか動かなくなったりと不安定なので、Dockerへ移行しました。

事前準備

システムの最新化とDockerの追加をしておきます。

shell
$ pacman -Sy
$ pacman -S docker docker-compose

Dockerを起動しておきます。

shell
$ systemctl start docker.service
$ systemctl enable docker.service

Docker関連ファイルの作成

Dockerfileとdocker-compose.yamlを作成します。

shell
cd /opt
mkdir radiko
cd radiko
vi Dockerfile
vi docker-compose.yaml
Dockerfile
FROM debian:bullseye-slim

RUN apt-get update

RUN apt-get install -y python3 pip
RUN pip install django

RUN apt-get install -y git
RUN git clone https://github.com/burrocargado/RadioRelayServer.git
RUN cd RadioRelayServer \
 && python3 manage.py migrate
RUN mkdir /var/lib/mpd && mkdir /var/lib/mpd/playlists

RUN apt-get install -y ffmpeg

CMD cd RadioRelayServer \
 && python3 manage.py runserver 0.0.0.0:9000
docker-compose.yaml
services:
  radiko-server:
    build:
      context: .
      dockerfile: ./Dockerfile
    volumes:
      - /srv/http/data/playlists:/var/lib/mpd/playlists
    ports:
      - 9000:9000
    restart: always

空のプレイリストを作成し、書き込み権限を与えておきます。

shell
touch /srv/http/data/playlists/00_radiko.m3u
chmod 666 /srv/http/data/playlists/00_radiko.m3u

ビルド

shell
cd /opt/radiko
docker compose build

成功すると、以下のようなメッセージが表示されます。

[+] Building 1/1
✔ radiko-server Built 0.0s

起動確認を行います。

shell
docker compose up

プレイリストが表示されて、再生ができればOK
Ctrl+C で停止させます。

起動

デーモンとして起動させます。

shell
docker compose up -d

再起動後も動いていればOK

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?