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/ampdampd 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/ampdIf 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/ampdThis 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/homeA sample env file:
HOME_DIR=/opt/ampd/home
LOGGING_FILE_NAME=
LOGGING_LEVEL_ORG_HIHN_AMPD=DEBUG
MPD_MUSIC_DIRECTORY=/mnt/music
MPD_SERVER=name-or-ip-of-my-mpd-server
SERVER_SERVLET_CONTEXTPATH=/ampd # if you want to access ampd via example.com/ampdTo 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