opengrok
opengrok copied to clipboard
Docker hub README push failures
Recently the release build of the Docker image started failing with:
Unable to push README to Docker Hub, response code: 400
Error: Process completed with exit code 1.
Previously this was a different error and was fixed via 6736a1188a2f4ab71395b4eaa656df23628c84ad however it seems this is not enough.
An option would be to switch to https://github.com/christian-korneck/docker-pushrm , the docker login is done as part of the release process: https://github.com/oracle/opengrok/blob/dc8582eec478cb038c781ec808632d9351eb6d9c/dev/docker.sh#L115 so this should be seamless transition.
On the root causing side, it appears that currently the data is not sent in JSON format per https://docs.docker.com/docker-hub/api/latest/#tag/repositories since the --data-urlencode
curl option used https://github.com/oracle/opengrok/blob/dc8582eec478cb038c781ec808632d9351eb6d9c/dev/docker.sh#L28 merely encodes the content of the file so in the HTTP body it will look like full_description=%23%20A%20Docker%20container%20for%20OpenGrok%0A%0...
.