Skip to content

bug: imgutil.GetRemoteImage does not take ENVBUILDER_DOCKER_CONFIG_BASE64 into account #77

Open
@johnstcn

Description

@johnstcn

Problem

When using envbuilder_cached_image with a cache repo requiring authentication and passing ENVBUILDER_DOCKER_CONFIG_BASE64 into the provider:

Failed to find cached image in repository "docker.local". It will be rebuilt in the next apply. Error: failed to fetch the envbuilder binary from the builder image: check remote image: check remote image: GET http://docker.local/v2/envbuilder/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:envbuilder Type:repository]]

This is assuming that the underlying Coder / Coder Provisioner deployment does not have the same image pull secret mounted and does not have DOCKER_CONFIG=path/to/config.json set in its env.

Workaround

Mount the same registry credential on the Coder deployment and set DOCKER_CONFIG=path/to/config.json

Proposed Solution

The Terraform provider should also take the base64-encoded docker config JSON into account when attempting to fetch the Envbuilder binary from the source image.

cc @bjornrobertsson

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions