diff --git a/musicbrainz-picard/.env b/musicbrainz-picard/.env new file mode 100644 index 000000000..f9c8955c3 --- /dev/null +++ b/musicbrainz-picard/.env @@ -0,0 +1,8 @@ +COMPOSE_PROJECT_NAME=musicbrainz-picard +USER_ID=1000 +GROUP_ID=1000 +TAKE_CONFIG_OWNERSHIP=1 +CLEAN_TMP_DIR=1 +SECURE_CONNECTION=1 +VNC_PASSWORD=password +VOLUME_CONFIG=./config diff --git a/musicbrainz-picard/.gitignore b/musicbrainz-picard/.gitignore new file mode 100644 index 000000000..04204c7c9 --- /dev/null +++ b/musicbrainz-picard/.gitignore @@ -0,0 +1 @@ +config diff --git a/musicbrainz-picard/Dockerfile b/musicbrainz-picard/Dockerfile new file mode 100644 index 000000000..73938015a --- /dev/null +++ b/musicbrainz-picard/Dockerfile @@ -0,0 +1,28 @@ +FROM jlesage/baseimage-gui:ubuntu-18.04 + +LABEL maintainer="carvajal.diego@gmail.com" + +# Update and Add musicbrainz Repo +RUN apt-get update && \ + apt-get -y --no-install-recommends install software-properties-common && \ + rm -rf /var/lib/apt/lists/* && \ + add-apt-repository ppa:musicbrainz-developers/stable + +# Install musicbrainz & fpcalc (provided by Chromaprint) +RUN apt-get update && \ + apt-get -y --no-install-recommends install picard libchromaprint-tools && \ + rm -rf /var/lib/apt/lists/* + +# Locale +ENV LANG=es_ES.UTF-8 +RUN apt-get update && \ + apt-get -y --no-install-recommends install locales && \ + locale-gen en_US.UTF-8 && \ + locale-gen es_ES.UTF-8 && \ + rm -rf /var/lib/apt/lists/* + +# Define Run +ENV APP_NAME="musicbrainz" +COPY startapp.sh /startapp.sh + +RUN /startapp.sh diff --git a/musicbrainz-picard/README.md b/musicbrainz-picard/README.md new file mode 100644 index 000000000..e10d5153b --- /dev/null +++ b/musicbrainz-picard/README.md @@ -0,0 +1,32 @@ +# Docker for musicbrainz-picard + +Container for MusicBrainz - [[Picard](https://picard.musicbrainz.org/)] https://picard.musicbrainz.org/ + +Run MusicBrainz Picard X app embedded in a containter with HTTP GUI (port 5800) or VNC (port 5900) export from [[Jlesage - Docker-baseimage-gui](https://github.com/jlesage/docker-baseimage-gui)] https://github.com/jlesage/docker-baseimage-gui Thanks for the image :P + +## Usage +Run the container: +* allow remote access through HTTP GUI. Connect to `http://:5800` +* allow remote access through VNC Client. Connect to `:5900` + +## Parameters +|Variable|Description|Default| +|:-|:-|-:| +|`-e USER_ID=PUID`|UserID|1000 +|`-e GROUP_ID=PGID`|GroupID|1000 +|`-e TAKE_CONFIG_OWNERSHIP=1`| When set to 1, owner and group of /config (including all its files and subfolders) are automatically set during container startup to USER_ID and GROUP_ID respectively.|1 +|`-e CLEAN_TMP_DIR=1`|When set to 1, all files in the /tmp directory are delete during the container startup.|1 +|`-e SECURE_CONNECTION=1`|When set to 1, an encrypted connection is used to access the application's GUI (either via web browser or VNC client).|1 +|`-e VNC_PASSWORD=password`|Password needed to connect to the application's GUI.|As you wish +|`-p 5800:5800`| Port HTTP|5800 +|`-p 5900:5900`| Port VNC|5900 +|`-v ${VOLUME_CONFIG}=/config`| Path to keep config app in a volumen| ./ + +## Volumen +All files in the container or application are configured to be saved in the path /config + +To make the music accessible from inside the container, you can create another volume with the files to be process persistently. For example `-v /music=/config/home/Music` + +### Example RUN + +docker run -e USER_ID=1000 -e GROUP_ID=1000 -e TAKE_CONFIG_OWNERSHIP=1 -e CLEAN_TMP_DIR=1 -e SECURE_CONNECTION=1 -p 5800:5800 -v ./config=/config -v /music=/config/home/Music elgranloky/musicbrainz-picard diff --git a/musicbrainz-picard/config.json b/musicbrainz-picard/config.json new file mode 100644 index 000000000..d8a9275b6 --- /dev/null +++ b/musicbrainz-picard/config.json @@ -0,0 +1,30 @@ +{ + "name": "Picard test", + "version": "1.0", + "slug": "piacrd", + "description": "The torrent client for Hass.io with OpenVPN support", + "url": "https://github.com/pierrickrouxel/hassio-addon-transmission", + "webui": "http://[HOST]:[PORT:5000]", + "startup": "services", + "arch": ["armhf", "armv7", "aarch64", "amd64", "i386"], + "map": [ + "config:rw", + "share:rw", + "ssl" + ], + "boot": "auto", + "ports": { + "5800/tcp": 5800, + "5900/tcp": 5900 + }, + "hassio_api": true, + "homeassistant_api": false, + "host_network": false, + "options": { + }, + "schema": { + }, + "environment": { + "LOG_FORMAT": "{LEVEL}: {MESSAGE}" + } + } diff --git a/musicbrainz-picard/docker-compose.yml b/musicbrainz-picard/docker-compose.yml new file mode 100644 index 000000000..a17b23b42 --- /dev/null +++ b/musicbrainz-picard/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' +services: + musicbrainz-picard: + build: + context: . + dockerfile: Dockerfile + environment: + - USER_ID=${USER_ID} + - GROUP_ID=${GROUP_ID} + - TAKE_CONFIG_OWNERSHIP=${TAKE_CONFIG_OWNERSHIP} + - CLEAN_TMP_DIR=${CLEAN_TMP_DIR} + - SECURE_CONNECTION=${SECURE_CONNECTION} + - VNC_PASSWORD=${VNC_PASSWORD} + volumes: + - ${VOLUME_CONFIG}:/config + ports: + - '5800:5800' + - '5900:5900' diff --git a/musicbrainz-picard/startapp.sh b/musicbrainz-picard/startapp.sh new file mode 100644 index 000000000..241bd83c7 --- /dev/null +++ b/musicbrainz-picard/startapp.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec env HOME=/config/home /usr/bin/picard