-
Notifications
You must be signed in to change notification settings - Fork 31
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
Docker Support #71
Docker Support #71
Conversation
@alrs, thanks you saved me a couple of hours of reaserch. I was planning to add Docker support again to the scripts but first I would have had to learn how to do that. |
So the
|
Well with the help of @iandees and @ianmcorvidae on the OSM US Slack channel I got it working. That first command does not seem to be necessary. The existing command also seems to require the images you want to upload to be placed in the
It seems like it would be better to bundle the scripts into the docker image instead of mounting them at runtime. Instead the location of the photos to upload could be mounted at runtime. I guess that would mean building a new docker image any time the scripts are updated. That doesn't seem like the end of the world though. I will try to play with this later. Might be a good excuse to get my feet wet with docker. |
An option that might be worth considering is Docker Hub's automated builds. Since those can trigger on every push, it'd make keeping a public image up to date very easy. |
@ToeBee For development use, you really don't want to bake the script into the container. @ianmcorvidae Docker Hub is, unfortunately, a somewhat terrible way to distribute software, unless you're rebuilding the images daily. We're stuck using Docker just to run these scripts, because of the decision to develop against the latest version of Python 3 that isn't yet widely available. Hopefully no one will change the Dockerfile to use something other than Debian, and as Buster becomes stable the default Python in the container will eventually be a lot more conservative than it is right now. Once the world catches up and I'm not interested in running Slack, but I will start hanging out in the |
I took a look at removing the PEP 576 type annotations from the codebase so that it could run on Debian Stable or on a Raspberry Pi, and saw that that it is used extensively. Type annotations require Python 3.6, both Debian and Raspbian in their stable releases only support Python 3.5.
This PR adds a
docker
Makefile recipe to build a Docker container forupload-scripts
that runs Python 3.7.2, as provided by not-yet-stable Debian Buster.