It is not a secret that since day one, Docker has been an important piece of our infrastructure. Our ambition is to go towards more integration in the Docker ecosystem. As a first step in that direction, today we are releasing a new add-on: the Docker image add-on. You will now be able to download the Docker images Scalingo has built for you and use it in different scenarios that we detail in this article.
Dockercon 2016 has just ended, and it is now our turn to release a whole new feature related to Docker. This feature is an addon named the Docker image Addon. With this new tool, you’ll be able to get back the Docker images that were built when deploying your applications in our infrastructure.
Each time you push some code to Scalingo, a build is triggered, resulting in the construction of a new Docker image. When this build phase is successful, we deploy this image and try to run it in our own cloud. This addon lets you download every Docker Image that has been built by Scalingo.
This feature is presented as an addon: just like you would add a database to your application, you can activate the Docker image downloading ability. Once the addon is added, you’ll see the Docker whale appear in your dashboard:
The purpose of this addon is to let you enjoy your ready-to-be-run application containers everywhere. Whatever the technology, no matter the environment, we produce generic container images which are autonomous and can work everywhere.
As a result, you can, for instance, also use Scalingo as a Docker Integration Platform. You push your code from one side and get a generic Docker image on the other. You can then use the Scalingo platform to get ondemand, instantly ready staging environments and run the final Docker image on your own private cloud or your customers’. It’s especially useful when your customers ask to run your application in their own environments for various reasons (Big Co wanting to controll their infrastructure, or legal reasons as in the MedTech world).
Dev-prod environments parity is in the center of consideration when deploying a project: it is even one of the rules of the 12 factor principle. From now on, you can download and execute in a few seconds the exact same environment as that running in production on your workstation. It will help you reproducing some nasty production-only bugs. Here is a short tutorial to get your started.
As an example, here is the method to login, then download and run an application image. The first step is to login to our Docker Registry:
$ docker login registry-2.scalingo.com
Username: [Scalingo Username]
Password: [Scalingo API token]
Once the authentication is successful, all you have to do is to run the image of your choice. The entrypoint script is /start
. The default process is web, but if you have defined a 'worker’ type in your Procfile, you will start it with /start worker
$ docker run -it \
-e PORT=4000 \
-p 4000:4000 \
registry-2.scalingo.com/app-sample-go-martini:517dc25c551f92a /start web
Unable to find image 'registry-2.scalingo.com/app-sample-go-martini:517dc25c551f92a' locally
517dc25c551f92a: Pulling from app-sample-go-martini
6599cadaf950: Already exists
23eda618d451: Already exists
f0be3084efe9: Already exists
52de432f084b: Already exists
a3ed95caeb02: Already exists
b11499e07372: Already exists
40d9c9cec188: Already exists
b7c87d00e3ba: Already exists
9aac245cd453: Already exists
31167a6ddc33: Pull complete
Digest: sha256:3756c48a76ee42f6c485749f16a12665e64ae668af12cd9a2e3d76ccf22ef2b8
Status: Downloaded newer image for registry-2.scalingo.com/app-sample-go-martini:517dc25c551f92a
2016/06/22 16:04:56 Listening on 0.0.0.0:4000
That’s it, the image is running on the defined port, and reachable from the host.
Because the app image is the exact same one we’re running in our cloud, you can use it, as stated previously, to debug your production code or as a pledge of reversibility.
We want to be transparent about the way we build your application Docker images. There is no secret, our stack image (or builder image) is public on the Docker Hub, and all the buildpacks we’re supporting and using are open-source and can be retrieved on Github
Now that Docker images are available, databases and automation tools are the next steps. Both are coming pretty soon! First, in the next blog post, we will tell you about getting closer in the dev/prod parity process by setting up databases based on the images used internally for our database addons.
On top of that, another new feature is coming: “Notifications”. You’ll be able to notify your target with a webhook that a deployment has ended and that a new version of an application image is available.
At Scalingo (with our partners) we use trackers on our website.
Some of those are mandatory for the use of our website and can't be refused.
Some others are used to measure our audience as well as to improve our relationship with you or to send you quality content and advertising.