-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile #20
base: master
Are you sure you want to change the base?
Add Dockerfile #20
Conversation
This is a great idea! I can certainly see the benefit of using the tool via a docker container. It would make it so people don't need to install the whole node.js toolchain in their host environment. I'm not very well versed in docker configuration, but looking at the docks it does seem that |
@stevenbenner Sorry it took me a long time to respond, somehow I missed the notification about your comment. The way I thought to design this at the time was to use a combination of I think you can use the The only other way I could think of to do this would be to specify everything as a I just pushed an update to the Dockerfile that uses the |
Howdy! @stevenbenner you still interested in doing this? Happy to help. |
Yeah, this still seems like a good idea to me. I'm just not knowledgeable enough to be able to evaluate the config, test it, publish it, and maintain it. My ideal (based on my limited understanding) would be that users could pass arguments to docker at run time and it would work the same as the script. And it seems like docker hub is the most popular way to publish dockerfiles, so that is probably where it would need to end up eventually. Also, I'm wondering if the docker script should be in a different repo? Since it would ideally be something that can be published on its own. I'll let you all tell me the right way to do it. |
This PR adds a Dockerfile that allows you to run the downloader without having to install
nodejs
or add a global package. It defines a docker volume at/downloads
that you can mount to where you want your wallpapers to be downloaded.To build the docker image, clone the repo and then execute the following command inside the cloned repo:
The
uid
andgid
arguments are optional, but I recommend using them so your wallpapers are created using your own user and group instead ofroot
.After building the image, you can run the downloader using the following command:
This will download 1 image in the current directory. If you want to download more than one image, you can pass the number to the run command. This will download 10 images:
I couldn't figure out a way to change the resolution and still keep the nice exec form for
ENTRYPOINT
, since it doesn't do argument substitution. If I think of a way around that, I will add it and update. Right now, the default resolution is1920x1080
, and I'm afraid you have to modify and build the Dockerfile if you need a different resolution.I hope this is helpful for others too.