In today’s DockerCon keynote we previewed an upcoming Docker Desktop feature that will make it easier than ever to design your own container-based applications. For a certain set of developers, the current iteration of Docker Desktop has everything one might need to containerize an applications, but it does require an understanding of the Dockerfile and Compose file specifications in order to get started and the Docker CLI to build and run your applications.
But we’ve been thinking about ways to bring this capability to ALL developers. We want to make it easier to get started with containerization, and we want to make it even easier to share and collaborate and integrate container-based development in to more developers’ toolsets. This new guided workflow feature is a preview of what we’re working on and we wanted to share more details on the ideas we’ve incorporated and are thinking about for the future.
The first thing you’ll notice is this is a graphical tool. We’re not breaking anything that’s already working today – everything being created behind the scenes is still Dockerfiles and Compose – we’re just giving you a new way to get from Point A to Point B, because not everyone wants to write Dockerfiles and Compose files from scratch.
Creating a New Custom Application
When you click the button to start the “Custom application” workflow you’re presented with a list services you can
add to your new application. Each service you select will eventually become a container in your final application, but Docker Desktop will take care of creating the Dockerfiles and Compose files for you as complete later steps.
Currently, you can also do some basic customization to the service when you add it: you can change versions, port numbers, and a few other options depending on the service selected.
Assemble Your Application
When you’ve selected all the services you want in your application and are ready to proceed, you give your application a name and specify where to store the files that will be generated and then hit the “Assemble” button.
The assemble step creates the Dockerfiles for each service, the Compose file used to start the entire application, and for most services some basic code stubs, giving you enough to start your application. Of course, you can open the code stubs in your editor of choice an
d start developing straight away, or replace them with existing code you already have. The Dockerfile created for the service is setup such that it will take whatever code you supply for the service and add it to the container that gets built. And it’s important to reiterate that this is a standard, plain-text Dockerfile. So if you or another member of your team wants to dig in and customize the container image you can modify the Dockerfile as needed.
Each service you selected to become part of the application will have its own Dockerfile, and whatever code stubs might be necessary to get the service started.
Run Your New Application
The application design feature also creates the Compose file you need to bring all the services you selected up together as a complete application. Just like the Dockerfiles, this is a standard Compose file that can be opened and customized, if you choose. If you happen to know the Docker CLI commands you would have enough here to bring up any individual service or the entire application. But the point of the guided workflow is to do this for you so there’s a “Run Application” button in the interface to coordinate everything:
This kicks off the build process for each service from the Dockerfiles and then brings up your application as specified in the Compose file. You might note the “Open in Visual Studio Code” button in the UI, which is the editor I happen to have installed on this laptop. Click that button and you’re taken directly to the project files inside the editor, ready to begin your new containerized code-build-test cycle.
Building from Templates
That was the “Custom application” workflow but there is another method for creating an application in these new workflows: template-based designs:
The main difference you’ll see in this workflow is that you’re presented with pre-configured application templates, instead of selecting all the individual services yourself:
The idea there is that teams will eventually be able to create their own templates to make collaboration and sharing much simpler. This is an area our current customers have told us is of particular interest, not just for sharing, but also for application architects and security teams to create pre-approved templates and possibly to restrict which services can be used.
We are working on adding more capabilities to these workflows: we’re finishing off support for the remaining Compose features like Secrets, Volumes and Networks. We also want to add integration with CI systems, and allow you to deploy to Docker Enterprise Edition directly from Docker Desktop.
Docker for ALL Developers
Making Docker accessible to a wider range of developers is a theme you’ll see us come back to again and again. If you have ideas to help us reach this goal, please let us know (Docker Desktop for macOS or Windows). If you’re interested in getting early access to the new app design feature in Docker Desktop then please sign up at beta.docker.com.
Learn More about DockerCon announcements:
- Check out our other big preview: Federated Application Management
- Watch the DockerCon Day 1 keynote replay if you missed the demonstration
- Register to access the beta when it’s available and download the current version of Docker Desktop for macOS or Windows 10 today, including the option to use Kubernetes.