The "official" Docker image of ampd
is rain0r/ampd.
All properties from the file application.properties can be set with environment variables. Replace all dots with underscores and use upper case.
For example: to set mpd.server
to my-mpd-server
, start ampd
with:
docker run -p 8080:8080 --env MPD_SERVER=my-mpd-server rain0r/ampd
ampd
will be available at http://localhost:8080
.
To persist the settings, create a file called env
with one KEY=VALUE
per line.
See env.sample as an example.
docker run -p 8080:8080 --env-file ./env rain0r/ampd
If you want to save radio streams, pass a volume parameter to docker:
docker run \
-p 8080:8080 \
--env MPD_SERVER=hermes \
--env HOME_DIR=/opt/ampd/home \
--volume ${PWD}/home:/opt/ampd/home \
rain0r/ampd
This is a sample compose.yaml
file to run ampd
:
services:
ampd:
image: docker.io/rain0r/ampd:latest
restart: always
container_name: "ampd"
network_mode: "host"
env_file: .env
volumes:
- /mnt/music:/mnt/music:ro
- ./home:/opt/ampd/home
To build an image ampd
form the master
branch:
git clone https://github.com/rain0r/ampd/
cd ampd
docker build . -t ampd -f docker/Dockerfile
docker run -p 8080:8080 ampd