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

[docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set #20586

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

geropl
Copy link
Member

@geropl geropl commented Feb 7, 2025

Description

So far GITPOD_IMAGE_AUTH had two issues:

  1. it was not present in the default env in terminals, although it was present in gp env
  2. it was used for pulling docker images in image builder, but not used in workspaces to authenticated the docker daemon

This PR fixes both issues, by introducing a project-level opt-in toggle to enable auto-login of dockerd if GITPOD_IMAGE_AUTH is specified.

Related Issue(s)

Fixes CLC-1098

Docs PR: https://github.com/gitpod-io/website/pull/5170

Prior PRs:

How to test

  • join this org
  • start a workspace, and note:
    • env | grep GITPOD_IMAGE_AUTH is not empty ✔️
    • docker pull geropl/workspace-base-3:latest "just works" ™️ ✔️
    • test gp validate:
      • change first line in .gitpod.yml to image: geropl/workspace-base-3:latest
      • hit gp validate and note how it successfully pulls the base image ✔️

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@geropl geropl changed the title [docker-up] Auto-login if GITPOD_IMAGE_AUTH is set [docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set Feb 7, 2025
Tool: gitpod/catfood.gitpod.cloud
…file if passed into workspace

Tool: gitpod/catfood.gitpod.cloud
…xpose it on the API

Tool: gitpod/catfood.gitpod.cloud
…s/env vars

Tool: gitpod/catfood.gitpod.cloud
Copy link

gitguardian bot commented Feb 11, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Had one blocking comment I left regarding permissions on Slack and some non-blocking ones.

I couldn't get the preview environment to load now, so couldn't test the end-to-end dockerd integration, hence this is just a code review.

…ite_settings permission

Tool: gitpod/catfood.gitpod.cloud
Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm. Feel free to unhold after looking at the rest of the review comments I left 🚀

Tool: gitpod/catfood.gitpod.cloud
@geropl
Copy link
Member Author

geropl commented Feb 12, 2025

/unhold

@roboquat roboquat merged commit e9aae6e into main Feb 12, 2025
19 checks passed
@roboquat roboquat deleted the gpl/1098-dockerup branch February 12, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants