Dockerfile failed to deploy (not connected to docker) in Intellij Idea

Viewed 5438

I'm new in Docker and just trying to follow instructions in this video. I created very simple Dockerfile:

enter image description here

But deploying failed and the problem is that there is not much info:

enter image description here

Docker is up and running and I can connect to it from the IDE:

enter image description here

enter image description here

Docker info:

enter image description here

4 Answers

If you are using the IDE on MacOs, you need to give it full disk access in the Privacy Settings in the OS.

If you've recently changed settings in "Docker Desktop" make sure to restart your IDE, before trying to build images/run containers.

You can follow the official instructions. Particularly this part:

Configure the Docker daemon connection settings:

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Docker.

Click  to add a Docker configuration and specify how to connect to the Docker daemon.

The connection settings depend on your Docker version and operating system. For more information, see Docker configuration.

The Connection successful message should appear at the bottom of the dialog.

I am exploring Docker for the first time too (although with JetBrains Rider rather than IntelliJ) and encountered the same error.

I resolved the error by right clicking on the dockerfile chevrons and building the image first:

Build Image

Once that had completed then I was able to successfully run the Dockerfile: Run Dockerfile

Success

Hoping that Intellij works in much the same way.

Related