From 159e623e65eaef473c2f0a098d1d4705091d4c8e Mon Sep 17 00:00:00 2001 From: Nitrousoxide Date: Sun, 26 Nov 2023 11:08:53 -0500 Subject: [PATCH 1/4] add section to readme for using docker --- README.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.rst b/README.rst index 9c1b3388..c4e40a9e 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,27 @@ For macOS users with MacPorts: sudo port install gallery-dl +Docker +-------- +Using the Dockerfile in the repository: + +.. code:: bash + git clone https://github.com/mikf/gallery-dl.git + cd gallery-dl/ + docker build -t gallery-dl:latest . + +To run the container you will probably want to attach some directories on the host so that the config file and downloads can persist across runs. + +Make sure to either download the example config file reference in the repo and place it in the mounted volume location or touch an empty file there. + +If you gave the container a different tag or are using podman then make sure you adjust. Run `docker image ls`` to check the name if you are not sure. + +This will remove the container after every use so you will always have a fresh environment for it to run. If you setup a ci-cd pipeline to autobuild the container you can also add a --pull=newer flag so that when you run it docker will check to see if there is a newer container and download it before running. + +.. code:: bash + docker run --rm -v $HOME/Downloads/:/gallery-dl/ -v $HOME/.config/gallery-dl/gallery-dl.conf:/etc/gallery-dl.conf -it gallery-dl:latest + +You can also add an alias to your shell for "gallery-dl" or create a simple bash script and drop it somewhere in your $PATH to act as a shim for this command. Usage ===== From b932d4fed8e1213fe5c1de73e26e4e16fcf26be2 Mon Sep 17 00:00:00 2001 From: Nitrousoxide Date: Sun, 26 Nov 2023 11:11:05 -0500 Subject: [PATCH 2/4] add docker section to readme --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index c4e40a9e..e3f4846e 100644 --- a/README.rst +++ b/README.rst @@ -137,6 +137,7 @@ Docker Using the Dockerfile in the repository: .. code:: bash + git clone https://github.com/mikf/gallery-dl.git cd gallery-dl/ docker build -t gallery-dl:latest . @@ -150,6 +151,7 @@ If you gave the container a different tag or are using podman then make sure you This will remove the container after every use so you will always have a fresh environment for it to run. If you setup a ci-cd pipeline to autobuild the container you can also add a --pull=newer flag so that when you run it docker will check to see if there is a newer container and download it before running. .. code:: bash + docker run --rm -v $HOME/Downloads/:/gallery-dl/ -v $HOME/.config/gallery-dl/gallery-dl.conf:/etc/gallery-dl.conf -it gallery-dl:latest You can also add an alias to your shell for "gallery-dl" or create a simple bash script and drop it somewhere in your $PATH to act as a shim for this command. From d949582934df5c7bcca43527c4053b577ca8ff4a Mon Sep 17 00:00:00 2001 From: Nitrousoxide Date: Sun, 26 Nov 2023 11:13:07 -0500 Subject: [PATCH 3/4] add docker how-to to readme --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index e3f4846e..fc43900c 100644 --- a/README.rst +++ b/README.rst @@ -146,12 +146,12 @@ To run the container you will probably want to attach some directories on the ho Make sure to either download the example config file reference in the repo and place it in the mounted volume location or touch an empty file there. -If you gave the container a different tag or are using podman then make sure you adjust. Run `docker image ls`` to check the name if you are not sure. +If you gave the container a different tag or are using podman then make sure you adjust. Run ``docker image ls`` to check the name if you are not sure. -This will remove the container after every use so you will always have a fresh environment for it to run. If you setup a ci-cd pipeline to autobuild the container you can also add a --pull=newer flag so that when you run it docker will check to see if there is a newer container and download it before running. +This will remove the container after every use so you will always have a fresh environment for it to run. If you setup a ci-cd pipeline to autobuild the container you can also add a ``--pull=newer`` flag so that when you run it docker will check to see if there is a newer container and download it before running. .. code:: bash - + docker run --rm -v $HOME/Downloads/:/gallery-dl/ -v $HOME/.config/gallery-dl/gallery-dl.conf:/etc/gallery-dl.conf -it gallery-dl:latest You can also add an alias to your shell for "gallery-dl" or create a simple bash script and drop it somewhere in your $PATH to act as a shim for this command. From 2a36937e45148fef8bc2b2ccf8b8a429d57ce879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 19 Dec 2023 01:53:17 +0100 Subject: [PATCH 4/4] add instructions for pulling dockerhub & ghcr images --- README.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index fc43900c..9ecf0aed 100644 --- a/README.rst +++ b/README.rst @@ -142,9 +142,23 @@ Using the Dockerfile in the repository: cd gallery-dl/ docker build -t gallery-dl:latest . +Pulling image from `Docker Hub `__: + +.. code:: bash + + docker pull mikf123/gallery-dl + docker tag mikf123/gallery-dl gallery-dl + +Pulling image from `GitHub Container Registry `__: + +.. code:: bash + + docker pull ghcr.io/mikf/gallery-dl + docker tag ghcr.io/mikf/gallery-dl gallery-dl + To run the container you will probably want to attach some directories on the host so that the config file and downloads can persist across runs. -Make sure to either download the example config file reference in the repo and place it in the mounted volume location or touch an empty file there. +Make sure to either download the example config file reference in the repo and place it in the mounted volume location or touch an empty file there. If you gave the container a different tag or are using podman then make sure you adjust. Run ``docker image ls`` to check the name if you are not sure.