Add Dockerfile to enable image building. Useful for development and tests under Docker workflow.
Using the official Python image, pinned to 2.x tag. More info at https://hub.docker.com/_/python/
Just adding files, installing protobuf dependencies, setting working dir and running build.
No config file built-in other than the template, to allow the image to be used as a 'clean base' by building in whatever config people feel like. It can also be mounted from outside of the container (as done in the examples below).
Build:
$ docker build -t mysql-replication-monitor .
Run:
$ docker run --rm -it -v /your/host/config.yml:/usr/src/app/config.yml mysql-replication-monitor [options]
FYI, there's a still quicker to test, already built image on my Docker Hub. Test it by running:
$ docker run --rm -it -v /your/host/config.yml:/usr/src/app/config.yml pataquets/mysql-replication-monitor [options...]
Using --rm causes the container to be deleted after stop.
Optional improvement to come (maybe in another issue):
Create an 'official', based on your repo, automated build at Docker Hub for the image: https://docs.docker.com/docker-hub/builds/ . Just requires a free Docker Hub account and a following a quick 'Create automated build' process. I'll be happy to help on it, if needed.
Add Dockerfile to enable image building. Useful for development and tests under Docker workflow. Using the official Python image, pinned to 2.x tag. More info at https://hub.docker.com/_/python/
Just adding files, installing protobuf dependencies, setting working dir and running build. No config file built-in other than the template, to allow the image to be used as a 'clean base' by building in whatever config people feel like. It can also be mounted from outside of the container (as done in the examples below).
Build:
Run:
FYI, there's a still quicker to test, already built image on my Docker Hub. Test it by running:
Using
--rm
causes the container to be deleted after stop.Optional improvement to come (maybe in another issue):