Docker Support in IntelliJ IDEA 14.1
As developers, we can all agree that shipping code should be easy. Whether deploying to a local testing or staging server, our laptop, or a Unix box halfway around the world, builds should be portable, predictable and (mostly) painless. But sometimes it seems like shipping code is half the battle – we spend countless hours configuring the infrastructure instead of delivering critical updates to our users. Docker is one solution to this problem, and now on IntelliJ IDEA 14.1, shipping code with Docker has never been easier.
With the new Docker plugin for IntelliJ IDEA, you can add Docker support to existing projects, deploy artifacts to a Docker host, view logs, and manage Docker containers from right inside IntelliJ IDEA. When you’re ready to connect to Docker, simply add a new Docker configuration under Cloud settings. The Docker platform offers many useful PaaS features and can serve as a kind of hosted cloud, with a remote API, SSH support, and commands for installing, configuring and managing changes to your application infrastructure.
There is a new Run/Debug Configuration for Docker deployments, which will allow you to specify the cloud deployment target, an appropriate Dockerfile, and give your Container a name. To create a new Container settings file, first select, “Save container settings sample” and indicate a destination, where the Docker plugin will create a default host configuration file (these settings are user-modifiable). While remote debugging assistance is not currently supported, you can assign a debugging port and copy/paste the arguments directly onto the Docker command line for remote debugging over JDWP.
From the Application Servers tool window, it’s easy to inspect containers and view running processes. You can also search through logs, start and stop containers, and perform basic container management like creating and deleting containers. Each deployment in Docker is assigned a unique container ID – these are initially temporary containers, although they can be committed and saved for further distribution. On the Docker Hub registry, there are many such images available for you to try.
Images in Docker are read-only – once committed, any changes to a container’s state will become part of a new image. When you have a stable build on one instance of Docker (on your development machine, staging server, or a cloud), reproducing the exact same build is as simple as (1) committing the Docker container, (2) pushing it to a registry (public or private), then (3) pulling the same image to another instance of Docker, running – wherever. This version control aspect is part of what makes Docker such a powerful tool for developers.
Docker support is still under development. To show your support, try a preview, and report any issues you may encounter, please refer to IDEA-133511. We look forward to hearing your feedback!
Update: Docker Integration is now available from the plugin repository.
Subscribe to Blog updates
Thanks, we've got you!
Import Postman Collections to the HTTP Client
We know that many of you use Postman collections and want to stay in the flow while working with them. This means staying inside IntelliJ IDEA and not switching to a different app. Great news! You can now effortlessly transform Postman collections into .http and use them in the HTTP Client …
Java Annotated Monthly – July 2023
Welcome to Java Annotated Monthly! We have an exciting edition lined up for you, packed with valuable content and insightful articles. You will learn about AI Assistant by JetBrains, discover new features in the upcoming Java 21 release, and gain valuable instruction from tutorials, tips, and tri…
What’s New in IntelliJ IDEA 2023.1 for Spring Developers
The IntelliJ IDEA 2023.1 release came packed with updates for Spring. This blog post will highlight the most noticeable changes, including full support for Lombok, a reworked Spring tool window, navigation for Spring Security rules, Spring Security 6 support, and more. Remember that these featur…
‘Quick’ Features in IntelliJ IDEA
A few IntelliJ IDEA features or actions include the term ‘quick’. Do they speed up certain processes? Let’s find out. In this blog post, I’ll cover what these features are, why you need them, and how you can use them. 1. Quick Lists If you have actions that you use regularly but don’t have shortcut…