This project builds the Docker image.
You will need Docker installed on your workstation; make sure it is a recent version as they are always breaking backwards compatibility.
Check out a copy of the project with:
git clone https://github.com/KxSystems/embedPy.git
Docker Cloud is configured to monitor when tags of the format /^[0-9.]+/
are added to the GitHub hosted project, a corresponding Docker image file is generated and made available.
This is all done server side as the resulting image is north of 350MB and uploading that sort of thing is likely to prompt the network team to Release the Kraken!
To do a deploy, you simply tag and push your releases as usual:
git push
git tag 0.7
git push --tag
- Log into Docker Cloud
- Create the new repository called
embedpy
- Go to the 'Builds' tab
- Set the 'Source Repository' to the GitHub account 'KxSystems' and project
embedPy
- Set the 'Build Rules' to:
- Source Type: Tag
- Source:
/^[0-9.]+/
- Docker Tag:
{sourceref}
- Dockerfile location:
docker/Dockerfile
- Build Context:
/
- Autobuild: enabled
- Build Caching: disabled (Docker Cloud is really buggy,
nocache=1
as a build env may help)
- Click on the 'Save' button
If you prefer to not have Docker Cloud build on every tag push, you can alternatively:
- Under 'Build Rules' disable 'Autobuild'
- Click on 'Save'
- At the bottom of the configuration page under 'Build triggers', create a URL that you can use to fire off a build
You should now be able to call curl
on the supplied URL to trigger the build, sparing you from having to log in to click a button.
To build locally the project you run:
docker build -t embedpy -f docker/Dockerfile .
Other build arguments are supported and you should browse the Dockerfile
to see what they are, but note for Docker Cloud you will need to make sure they are also explicitly exported in docker/hooks/build
too.
Once built, you should have a local embedpy
image you can run the following to use it:
docker run -it -v `pwd`/q:/tmp/q embedpy