Introducing Custom Docker Images, Private Docker Repositories and Environment Variables
We’re happy to announce three awesome new IronWorker features:
- Custom Docker Images for all and Docker is now the default code packaging mechanism
- Support for private Docker images on any Docker Registry, including Docker Hub
- Support for custom environment variables
Table of Contents
Custom Docker Images for All!
Previously only available to customers on dedicated plans, this is now available to everyone! You can create custom Docker images and run them at scale on the Iron.io Platform. And as usual, you don’t need to think about servers or scaling or managing anything, you just queue up jobs/tasks. Jobs are executed using your Docker image + a message/payload that defines that job.
To read how to make your own Docker Worker using the language of your choice, please see our Docker Worker GitHub repository for full documentation for most languages.
There is a size limit to custom images on our small/free plans of 200MB so you’ll definitely want to use the iron/x base images that we use in our examples to keep them small. If you need bigger images, you can upgrade your account.
Once you’ve pushed your image to Docker Hub, simply let Iron.io know about it:
Then you can start queuing up jobs for it.
You can see the full API here and client libraries for the language of your choice here.
Private Docker Repositories
Not only can you use your own custom images, but you can also store those images privately and still use them on IronWorker. Obviously, you don’t want other people to access your code inside your image or any type of config files you might have put in the image (although we recommend using environment variables for that, see next section) so you can use a private Docker repository to keep it private.
To use your private images on Iron.io, you need to login like you do with Docker:
https://gist.github.com/treeder/da63e7cb8622d872579e
Then just do everything else like normal.
Iron.io Serverless Tools
Speak to us to learn how IronWorker and IronMQ are essential products for your application to become cloud elastic.
Environment Variables
Instead of uploading a config file as JSON, we’ve added support for custom environment variables that will be passed into your Docker container at runtime. This allows you to set options that you don’t want to include in your Docker images, such as database credentials or variables that might change based on the environment (development vs production for instance).
These are set by using -e flags on the iron register, for example:
That’s it for Now
These new features give you the full capability to use Docker to its full potential. Now that this is in place, there's a lot of exciting new things to come that will build on this.
Unlock the Cloud with Iron.io
Find out how IronWorker and IronMQ can help your application obtain the cloud with fanatical customer support, reliable performance, and competitive pricing.