Docker Hub automated builds are nice to build automatically Docker images when code is pushed to the linked git repository but they do not support Docker multi-stages by default.
To do so is needed to override the default commands that Docker Hub uses internally by using hooks.
In this example we have two stages:
dev
will be built from master branch onlyprod
will be built per git tag