Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to push to repository due to "manifest invalid" error. #10879

Closed
madelaney opened this issue Apr 7, 2021 · 4 comments
Closed

Unable to push to repository due to "manifest invalid" error. #10879

madelaney opened this issue Apr 7, 2021 · 4 comments

Comments

@madelaney
Copy link

madelaney commented Apr 7, 2021

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

We have a number of packer configuration files (json), that builds a container but when we try to push to our internal registry we get an error of: docker (docker-push): manifest invalid: manifest invalid.

Reproduction Steps

Just run packer build <gist file> on Mac OS (Big Sur). I tried to reproduce this on Linux (Ubuntu 18.04) using Packer 1.7.2 and I could not but a coworker could reproduce this on another Mac OS (Big Sur) machiune.

Packer version

Tested with Packer 1.7.2, 1.6.0, and 1.5.6.

Simplified Packer Buildfile

A sample json file has been placed here

Operating system and Environment details

Mac OS X (amd64), Big Sur (11.2.2)

Log Fragments and crash.log files

From our internal registry (Artifactory) we see this in the logs:

2021-04-07T12:04:18.575Z [jfrt ] [WARN ] [7b02eb14f7c5ddb6] [.r.ArtifactoryResponseBase:125] [-nio-8081-exec-14780] - Sending HTTP error code 400: Property key: docker.label.desktop.docker.io/binds/0/SourceKind is invalid due to Name must start with a letter and cannot contain whitespace or special characters
2021-04-07T12:04:18.577Z [jfrt ] [ERROR] [7b02eb14f7c5ddb6] [h.DockerManifestPutHandler:261] [-nio-8081-exec-14780] - Error uploading manifest: 'Property key: docker.label.desktop.docker.io/binds/0/SourceKind is invalid due to Name must start with a letter and cannot contain whitespace or special characters'

From the packer run we see this:

    docker (docker-push): e5307c768962: Preparing
    docker (docker-push): fa728254b20e: Preparing
    docker (docker-push): 33a48e9ca2ba: Preparing
    docker (docker-push): 8aad4316c1e3: Preparing
    docker (docker-push): 9f7793952dca: Preparing
    docker (docker-push): 2bb84c5f5766: Preparing
    docker (docker-push): 8ea3b23f387b: Preparing
    docker (docker-push): 2bb84c5f5766: Waiting
    docker (docker-push): 8ea3b23f387b: Waiting
    docker (docker-push): 8aad4316c1e3: Layer already exists
    docker (docker-push): 33a48e9ca2ba: Layer already exists
    docker (docker-push): 9f7793952dca: Layer already exists
    docker (docker-push): fa728254b20e: Layer already exists
    docker (docker-push): 2bb84c5f5766: Layer already exists
    docker (docker-push): 8ea3b23f387b: Layer already exists
    docker (docker-push): e5307c768962: Pushed
    docker (docker-push): manifest invalid: manifest invalid
2021/04/07 08:05:58 packer-post-processor-docker-push plugin: error: Bad exit status: 1
2021/04/07 08:05:58 [INFO] (telemetry) ending docker-push

* Post-processor failed: Bad exit status: 1
==> Wait completed after 10 seconds 179 milliseconds
2021/04/07 08:05:58 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
Build 'docker' errored after 10 seconds 178 milliseconds: 1 error(s) occurred:
2021/04/07 08:05:58 machine readable: docker,error []string{"1 error(s) occurred:\n\n* Post-processor failed: Bad exit status: 1"}


* Post-processor failed: Bad exit status: 1
==> Builds finished but no artifacts were created.
2021/04/07 08:05:58 [INFO] (telemetry) Finalizing.
* Post-processor failed: Bad exit status: 1

==> Wait completed after 10 seconds 179 milliseconds
@madelaney madelaney added the bug label Apr 7, 2021
@madelaney
Copy link
Author

Following the error from Artifactory where it says the label SourceKind is invalid, I tried to do some basic debugging using docker inspect to view the labels and I everything seemed find but /shrug.

$ docker inspect sample-container | jq '.[0].Config.Labels'
{
  "desktop.docker.io/binds/0/Source": "/Users/mdelaney/.packer.d/tmp457429910",
  "desktop.docker.io/binds/0/SourceKind": "hostFile",
  "desktop.docker.io/binds/0/Target": "/packer-files",
  "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
}
$ docker inspect sample-container | jq '.[0].ContainerConfig.Labels'
{
  "desktop.docker.io/binds/0/Source": "/Users/mdelaney/.packer.d/tmp457429910",
  "desktop.docker.io/binds/0/SourceKind": "hostFile",
  "desktop.docker.io/binds/0/Target": "/packer-files",
  "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
}

@madelaney
Copy link
Author

If it helps, here is the version of the "Docker desktop" that I'm running:

docker-desktop-version

@ghost
Copy link

ghost commented Apr 7, 2021

This issue has been automatically migrated to hashicorp/packer-plugin-docker#28 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-docker#28.

@ghost
Copy link

ghost commented May 8, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators May 8, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants