I have an automation task that uses pyautogui
and python3 to open a pdf and fill it out with predefined fields from JIRA (The pdf is locked down and there is no way to programatically interface with it other than pyautogui
.) The script snaps to the top left of a screen where a pdf is opened, clicks in the pdf and then keystrokes are automated from there.
All of this works great on a desktop but now its time to put this on a server where it will run and the best option to deploy looks like Docker. Is what I'm suggesting possible or is there another method that will work like a docker-machine or VM ? This is my first deployment and it's small enough to really mess around with all possible options and do some good learning.
Docker is, in general, not a good match for GUI applications. In principle what you describe is possible, but if you're expecting a VM-like setup that can launch an X server, and the process you're trying to automate, and an automation program, an actual VM will work much better for this than Docker will.
That's doubly true if you already have a setup that can deploy your system on a clean Ubuntu desktop setup, or something along those lines; you should be able to deploy that almost as-is on a VM (maybe using a tool like Packer to automate building the VM image), but there will be a lot of "reinventing the wheel" and working around Docker's various limitations if you try to do this in Docker. Even getting a container that can run the three steps of "launch an X server" and so on winds up being a not-my-first-Docker-project level of complicated.