Skip to content

Please support private Docker registries with a non-default port #16237

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

Closed
jankeromnes opened this issue Feb 6, 2023 · 1 comment · May be fixed by #20806
Closed

Please support private Docker registries with a non-default port #16237

jankeromnes opened this issue Feb 6, 2023 · 1 comment · May be fixed by #20806
Labels
meta: stale This issue/PR is stale and will be closed soon team: workspace Issue belongs to the Workspace team type: bug Something isn't working

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Feb 6, 2023

Bug description

Today in Gitpod, you can use private Docker images by specifying a GITPOD_IMAGE_AUTH Project-level variable as described in:

https://www.gitpod.io/docs/configure/workspaces/workspace-image#use-a-private-docker-image

Unfortunately, since : was used as a separator, you cannot specify Docker registries with non-default ports, i.e.:

  • Specifying registry.example.com works ✅

    • (GITPOD_IMAGE_AUTH="registry.example.com:Zm9vOmJhcg==" is properly recognized 👍)
  • Specifying registry.example.com:1337 doesn't work ❌

    • (GITPOD_IMAGE_AUTH="registry.example.com:1337:Zm9vOmJhcg==" is ignored due to the double : 😖)

Steps to reproduce

  1. Try to specify a private Docker registry using a non-default port (like registry.example.com:1337)

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

The following code ignores any value of GITPOD_IMAGE_AUTH that doesn't have exactly one : character:

(imageAuthValue.value || "")
.split(",")
.map((e) => e.trim().split(":"))
.filter((e) => e.length == 2)
.forEach((e) => res.set(e[0], e[1]));

Suggestion: Maybe, it could instead split on the last occurrence of a :, and allow 0 or 1 : to be present in the Docker registry hostname ? (Or, maybe it could allow a base64-encoded Docker registry hostname?)

@jankeromnes jankeromnes added type: bug Something isn't working team: workspace Issue belongs to the Workspace team labels Feb 6, 2023
@stale
Copy link

stale bot commented May 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label May 9, 2023
@stale stale bot closed this as completed Jun 11, 2023
@github-project-automation github-project-automation bot moved this to Awaiting Deployment in 🌌 Workspace Team Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: stale This issue/PR is stale and will be closed soon team: workspace Issue belongs to the Workspace team type: bug Something isn't working
Projects
No open projects
Status: Awaiting Deployment
Development

Successfully merging a pull request may close this issue.

1 participant