If you read my blogs often, you know how excited I am about Docker. And about Git. So you can imagine my excitement over our announcement today: Docker Automated Builds are now integrated with Bitbucket!
What is Docker?
Simply put, Docker is the next big thing in provisioning and deployment automation. With Docker, you can define everything needed to run applications–including the OS, database, environment variables, and start/stop scripts–and save it in a text file so that image can be re-used. And updated. And shared.
Using Docker makes applications and environments easier (read: cheaper) to recreate than to repair. If you’re a developer, you can probably already see the implications for your local workstation. And that’s right, QA: a fresh new environment for each CI run is just a Dockerfile away.
Dockerfile all the things
Much like a Chef recipe or Puppet manifest, a Dockerfile is where you describe each step needed to get an application into its desired state so you can use it–either starting from bare metal or starting from where a parent Dockerfile leaves off. Beginning your Dockerfile with “FROM ubuntu:14.04” means that when your Dockerfile is executed, Docker will actually execute the entire ubuntu:14.04 Dockerfile first. Yay for inheritance!
The great thing about Dockerfiles (besides inheritance) is that they can be stored in version control, which brings the benefits of history, comments, and branching. Instead of keeping deployment and set-up steps in a runbook, or–let’s face it–on a series of post-it notes framing your monitor, you can express them in a simple text file and access it from anywhere. Not to mention that you can share them so others in the development community don’t have to re-invent the wheel.
So about those Automated Builds…
Soon after Docker appeared on the scene, they introduced Automated Builds as an easy way to link Docker to your source code repository. This allows teams and developers to build the containers defined in your Dockerfiles automatically each time a change is pushed to the repo, using Bamboo or another build automation tool.
Automated Builds also allow the people building your containers to see exactly what they are getting because they can see not only the contents of the Dockerfile, but all the supporting artifacts referenced by the Dockerfile (scripts, etc.) right there in your repo.
As part of my previous Docker explorations I showed how to link up JIRA and Stash together. So it makes sense to provide Automated Build containers for those now! Check out my Docker projects–including JIRA, Stash, and Crowd–as well as the corresponding repos on Bitbucket. Keep in mind that it’s all experimental for now, but they are fun to play around with while we work on official Automated Build containers for our tools.
Look for us on Docker Hub
Where will one find those official Automated Build containers for Atlassian tools? Glad you asked.
Docker has just announced Docker Hub, where users can share and manage container-based applications through public and private repos. The Docker Hub registry already offers more than 14,000 “Dockerized” applications, and you can even invite others in the community to collaborate with you on your own application development.
Look for Atlassian tools on Docker Hub, coming soon!