mavendockerdocker-maven-plugin

How can I configure com.spotify.dockerfile-maven-plugin to run on Docker Toolbox?


I started out using the com.spotify.docker-maven-plugin, but it's wiki on GitHub says to switch to com.spotify.dockerfile-maven-plugin. However in the first plugin I'm able to specify the Docker Host, but I can't figure out how to it with the latter.

My machine runs Windows 7 with Docker toolbox, so there is no Docker Daemon on localhost.

The documentation on the dockerfile-maven-plugin does not seem to explain how to do this.


Solution

  • I fixed the problem by removing the toolbox completely and installing the latest version (I'm on v17.07.0-ce now, I believe I was v17.05.0-ce before).

    I also kept the environment variables described in the question (e.g. DOCKER_HOST=192.168.99.100:2376).

    Note I ran into some issues with virtualbox since the Docker Toolbox installation removed the virtualbox.msi which was registered as the source of installation. To work around this I downloaded the installer (here) and used a variation on the following command to extract the msi.

    VirtualBox-4.0.4-70112-Win.exe -extract -path c:\temp
    

    I had to rename the .msi file to virtualbox.msi and then I could remove the old version.