From 98faa4e9ecb0074b0724ebb7cf4cbbdbbb897899 Mon Sep 17 00:00:00 2001 From: themonkeyz Date: Wed, 20 Jul 2016 22:22:09 -0400 Subject: [PATCH 1/4] Adds support for docker. Can be built straight on docker hub. --- docker/Dockerfile | 3 +++ docker/README.md | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..e4f5714 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,3 @@ +FROM ruby:2.1 +RUN gem install wayback_machine_downloader +ENTRYPOINT [ "/usr/local/bundle/bin/wayback_machine_downloader" ] diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..3f1db48 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,6 @@ +Usage: +docker run --rm -it -v $PWD/websites:/websites themonkeyz/wayback_machine_downloader http://old_website.com + +Saves the websites in their own subdirectories in the websites directory in the current working directory. + +See main README for more details. From 498c28bbe720b1122afe417a212200c9b898020c Mon Sep 17 00:00:00 2001 From: themonkeyz Date: Wed, 20 Jul 2016 22:47:23 -0400 Subject: [PATCH 2/4] Now builds in the container instead of pulling from the reposi-thingy. --- docker/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e4f5714..5bb8ddb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,3 +1,7 @@ FROM ruby:2.1 -RUN gem install wayback_machine_downloader +COPY ../ /build +RUN cd build && \ + bundle install && \ + cd .. && \ + rm -rf build ENTRYPOINT [ "/usr/local/bundle/bin/wayback_machine_downloader" ] From 2742202cb0c9b5db5c4188244c1f7da559c332f4 Mon Sep 17 00:00:00 2001 From: themonkeyz Date: Wed, 20 Jul 2016 23:14:59 -0400 Subject: [PATCH 3/4] Turns out we can't build stuff in ../ --- docker/Dockerfile => Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename docker/Dockerfile => Dockerfile (57%) diff --git a/docker/Dockerfile b/Dockerfile similarity index 57% rename from docker/Dockerfile rename to Dockerfile index 5bb8ddb..9b4c804 100644 --- a/docker/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM ruby:2.1 -COPY ../ /build +COPY . /build RUN cd build && \ - bundle install && \ - cd .. && \ - rm -rf build + bundle install ENTRYPOINT [ "/usr/local/bundle/bin/wayback_machine_downloader" ] From 75f9f6e43849ad8451ddddd3abef53126627cefb Mon Sep 17 00:00:00 2001 From: themonkeyz Date: Wed, 20 Jul 2016 23:15:45 -0400 Subject: [PATCH 4/4] Reworded the README and included it into the main one. --- README.md | 10 ++++++++++ docker/README.md | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 docker/README.md diff --git a/README.md b/README.md index 7841a5f..502b282 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,16 @@ Or if you want to download every images without anything else: wayback_machine_downloader http://example.com --only "/\.(gif|jpg|jpeg)$/i" +## Using the Docker images + +All the options should work the same, just run it with this command instead of installing the gem: + + docker run --rm -it -v $PWD/websites:/websites hartator/wayback-machine-downloader + +You can use git branches as image tags to test new features on Docker Hub automated builds: + + docker run --rm -it -v $PWD/websites:/websites yourname/yourrepo:yourfeature + ## Contributing Contributions are welcome! Just submit a pull request via GitHub. diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 3f1db48..0000000 --- a/docker/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Usage: -docker run --rm -it -v $PWD/websites:/websites themonkeyz/wayback_machine_downloader http://old_website.com - -Saves the websites in their own subdirectories in the websites directory in the current working directory. - -See main README for more details.