HTTP 400 Bad Request with docker-maven-plugin

TL;DR: Check your Dockerfile (try to build it manually) before anything else!

Today I was struggling with a 400 error:

Exception caught: Request error: POST 400: HTTP 400 Bad Request -> [Help 1]

when building an image with the docker-maven-plugin. After installing and uninstalling docker, cleaning up certificates etc, I figured out my setup had nothing to do with it. Instead, there was a configuration error or the docker file. More specific, I was using alpine and I forgot the RUN prefix to a command.

I’ve tried to dun the build manually and failed. Once I’ve fixed my Dockerfile, could run the maven build without a hitch.


A little experiment: If you find this post and ad below useful, please check the ad out :-)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.