Update docker and make it runnable

This commit is contained in:
IamTheFij 2019-06-28 17:40:54 -07:00
parent 56fe2b054d
commit 1320ddebc0
2 changed files with 16 additions and 3 deletions

View File

@ -9,4 +9,4 @@ ENV BEETSDIR=/beets
COPY ./config.yaml ./
ENTRYPOINT beet
ENTRYPOINT ["/usr/local/bin/beet"]

View File

@ -1,5 +1,6 @@
SOURCE_DIR := ~/Music/Music_Raw
TARGET_DIR := ~/Music/Music
DOCKER_TAG := beets-dev-${USER}
SOURCE_DIR := ~/Music/Incoming
TARGET_DIR := ~/Music/Library
BEET_CMD := BEETSDIR=. ./beets_env/bin/beet -d $(TARGET_DIR)
default: beets_env
@ -25,3 +26,15 @@ web: beets_env
# Cleans environment and beets config
clean:
rm -fr ./beets_env ./import.log ./library.db ./state.pickle
docker-build:
docker build . -t $(DOCKER_TAG)
docker-import: docker-build
docker run --rm -it \
-v $(shell pwd):/beets \
-v $(SOURCE_DIR):/source \
-v $(TARGET_DIR):/target \
$(DOCKER_TAG) \
-d /target \
import -i -c /source