Spurred by #63 , this pull request brings in changes to how Docker images are build and used:
First of all, after having read some blogs and opinion pieces, the process supervisor dumb-init is used as the ENTRYPOINT in Dockerfile, mainly because it is available from PyPi and the rest of Dockerfile is Python-themed.
By default, running $ docker run --rm -it tidal-wave:latest will execute tidal-wave --help, printing the help dialog of the Python program and exiting, similar to previous behavior
Passing arguments to docker run is just like passing them to tidal-wave without Docker; a helpful alias to set up might be $ alias tidalwave='docker run --name=tidal-wave --rm -it --volume ~/Music:/home/debian/Music --volume ~/.config/tidal-wave:/home/debian/.config/tidal-wave ghcr.io/ebb-earl-co/tidal-wave:latest'. Using this would be essentially identical to non-Docker Python invocation.
In order to have a long-running container for repeated execution, only two small changes to the above need be made: $ docker run --name=tidal-wave -dit --volume ~/Music:/home/debian/Music --volume ~/.config/tidal-wave:/home/debian/.config/tidal-wave --entrypoint="/bin/bash" ghcr.io/ebb-earl-co/tidal-wave:latest
What this will do is start a container named tidal-wave that runs in the background (-d), and, instead of executing the Python program tidal-wave and exiting, it executes /bin/bash, a shell in the container. From here, one would execute the tidal-wave Python program logic by using docker exec, like so:
$ docker exec -it tidal-wave 'tidal-wave https://listen.tidal.com/... ...'
Spurred by #63 , this pull request brings in changes to how Docker images are build and used:
dumb-init
is used as theENTRYPOINT
in Dockerfile, mainly because it is available from PyPi and the rest of Dockerfile is Python-themed.$ docker run --rm -it tidal-wave:latest
will executetidal-wave --help
, printing the help dialog of the Python program and exiting, similar to previous behaviordocker run
is just like passing them totidal-wave
without Docker; a helpful alias to set up might be$ alias tidalwave='docker run --name=tidal-wave --rm -it --volume ~/Music:/home/debian/Music --volume ~/.config/tidal-wave:/home/debian/.config/tidal-wave ghcr.io/ebb-earl-co/tidal-wave:latest'
. Using this would be essentially identical to non-Docker Python invocation.$ docker run --name=tidal-wave -dit --volume ~/Music:/home/debian/Music --volume ~/.config/tidal-wave:/home/debian/.config/tidal-wave --entrypoint="/bin/bash" ghcr.io/ebb-earl-co/tidal-wave:latest
What this will do is start a container namedtidal-wave
that runs in the background (-d
), and, instead of executing the Python programtidal-wave
and exiting, it executes/bin/bash
, a shell in the container. From here, one would execute thetidal-wave
Python program logic by usingdocker exec
, like so:$ docker exec -it tidal-wave 'tidal-wave https://listen.tidal.com/... ...'