Features Plugins

What does IntelliJ IDEA 2017.3 have in store for Docker support?

In IntelliJ IDEA 2017.3 the Docker integration has had a lot of changes made to it, both big and small. What does this really entail though? Let’s find out!

First of all, there are improvements to the Run/Debug Configurations dialog. Now you have the choice of three types of Docker Run Configurations:

  • Docker Image
  • Dockerfile
  • Docker-compose


Create Docker Configuration dialog

The Create Docker Configuration dialog has also been redesigned. One of the goals of this rework was to make it possible to accept the CLI arguments directly, without converting the docker run command into a JSON file.

At the moment we don’t cover 100% of all of the docker arguments, but if you are missing support for any of the docker run options, add a comment to this issue IDEA-181088 or create a new issue, and we will try and get it supported, as soon as possible.

Now, with the Docker plugin you can not only use environment variables, but also files with environment variables to run a Docker container. Add files with environment variables to the command line options field, in the Create Docker Configuration dialog. With this new feature there is no need to learn the new syntax — You can just refer to the file with `--env-file production.env` like you would normally do in the CLI.

Screen Shot 2017-11-15 at 14.46.26


A new Build Image action was added to the gutter for the Dockerfile.

Screen Shot 2017-11-17 at 16.22.04

The Docker plugin now supports the Dockerfile with custom names.

Screen Shot 2017-11-08 at 19.30.43

In order to start using this new feature: add the files that will be used as Dockerfiles, to the Docker Recognized File Type in the Preferences | Editor | File Types .

Screen Shot 2017-11-08 at 19.03.32

With the Docker plugin you can select a dockerfile from the dropdown list in the Run/Debug Configurations.

Screen Shot 2017-11-15 at 14.57.49

Another improvement we made for working with dockerfiles, is that the docker plugin can set environment variables in the container during the docker build.

The Stopped Containers and Untagged Images filters are now available from the Filter icon in the gutter of the Docker Tool Window.

Screen Shot 2017-11-08 at 09.35.04

Last but not least, there is now the support for alternative names for the docker-compose.yml files. Another enhancement to this is the ability to use docker-compose.yml files from any folder, not just the project folder.

Please take into account that the Docker plugin is not bundled yet, and in order to test the new functionality, you need to update this plugin.

We hope you find this new functionality awesome. Give the new features a try and share your feedback with us here in the comments, in our issue tracker, or on Twitter.

Happy Developing!


Comments below can no longer be edited.

8 Responses to What does IntelliJ IDEA 2017.3 have in store for Docker support?

  1. Avatar

    Loïc Prieto says:

    November 20, 2017

    Great addition!

    Docker and Docker compose is such an important part of our development toolchain, that any integration of docker in IntelliJ is more than welcome! I look forward to future progress in the docker features.

    I don’t know if there are plans to allow java remote debugging from a docker container, but it would be awesome.


  2. Zlata Kalyuzhnaya

    Zlata Kalyuzhnaya says:

    November 28, 2017

    Hi Loïc! Thanks for your feedback. Actually we do have plans to allow java remote debugging from a docker container and hopefully it will be available in 2018.2

  3. Avatar

    Drew says:

    January 8, 2018

    Are there any blog posts on why the Docker run configuration was set up this way? Why do I need to fill out a form so that the IDE can generate “docker build” and “docker run” commands, when I can write those commands myself? Why are some of the run arguments unsupported?

    I’d prefer to simply write/paste in Docker build and run commands, and have the IDE run my commands when I click a build and/or run button, or use a keyboard shortcut.

    • Zlata Kalyuzhnaya

      Zlata Kalyuzhnaya says:

      January 25, 2018

      Hi Drew,
      We are constantly working on the Docker support. We would like to keep improving the Docker support, and we always rely on feedback from our users. So if you miss any functionality or face some usability problems, please file a new issue (provide as many details as possible).
      You can use terminal integrated in the IDE or you can use UI.
      Please add needed docker run options to this issue IDEA-181088.
      Thank you!

  4. Avatar

    Bian Jiaping says:

    October 16, 2018

    I took me some time to find out how to use custom Dockerfile names. It’s better to add the usage to documentaions on https://www.jetbrains.com/help/idea/docker.html

    • Avatar

      Alexey Zhebel says:

      October 16, 2018

      Bian Jiaping, could you clarify what you struggled with? When you add a file to your project and name it “Dockerfile”, IDEA will automatically recognize the correct file type. If you give it some other name, it prompts you to select the type for the file.

      • Avatar

        Bian Jiaping says:

        October 16, 2018

        Before I installed the docker plugin, some docker files already existed and were treated as plaintext file. I don’t know how to make IntelliJ IDEA treat these files as Dockerfile, until I find this post which says that I can add custom file name patterns to Preferences | Editor | File Types | Dockerfile.

        I just searched around and find it is really not easy to manually change the file type association of a single file: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206237949-Change-file-association-manually

        • Avatar

          Alexey Zhebel says:

          October 16, 2018

          Thank you! Your suggestion looks good. I will add some info about associating existing Dockerfiles in a project with the correct file type.

Discover more