Skip to content

Always fails to get manifest when the authentication is required #28

@FantomJAC

Description

@FantomJAC

When the docker-compose file includes the image from the registry that requires authentication (e.g. ghcr.io) it always fails to get manifest with the following error (from build.ts)

debug(`${task.serviceName}: Image manifest data unavailable for ${r}`);

Reason is that inside getManifest function, it uses docker-modem library without passing any authentication info.

	const optsf = {
		path: `/distribution/${repository}/json?`,
		method: 'GET',
		statusCodes: {
			200: true,
			403: 'not found or not authorized',
			500: 'server error',
		},
	};

optsf shall include the object authconfig so docker-modem will encode it and use it as X-Registry-Auth.

FYI: https://docs.docker.com/engine/api/v1.42/#section/Authentication

This authentication info shall be derived from registry-secrets.yml file from Balena CLI, but that is also not the case.

As a result, it is currently impossible to use multiarch images from the major private repositories such as ghcr.io.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions