Skip to content

Conversation

flakey5
Copy link
Member

@flakey5 flakey5 commented Sep 9, 2025

Closes CC-4634

Adds a containers ssh command + ssh and authorized_keys properties to a container's configuration. This allows for ssh'ing into a container through wrangler.

  • Currently not working since it relies on pending api gateway PRs

@flakey5 flakey5 requested review from a team as code owners September 9, 2025 00:32
Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: 22f6eff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@cloudflare/containers-shared Minor
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Sep 9, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10582

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10582

miniflare

npm i https://pkg.pr.new/miniflare@10582

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10582

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10582

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10582

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10582

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10582

wrangler

npm i https://pkg.pr.new/wrangler@10582

commit: 22f6eff

Comment on lines +1 to +4
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really needed?
If not, can this be removed from all the added files?

Copy link
Contributor

Choose a reason for hiding this comment

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

this is all auto-generated code that's being copy-pasted over, we should remove these ignores but i can do that in a separate PR - its not really on @flakey5 :')

Comment on lines +1 to +4
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

Copy link
Contributor

Choose a reason for hiding this comment

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

this is all auto-generated code that's being copy-pasted over, we should remove these ignores but i can do that in a separate PR - its not really on @flakey5 :')

resolve(undefined);
} else {
reject(
new Error(`ssh exited unsuccessfully. Is the container running?`)
Copy link
Contributor

Choose a reason for hiding this comment

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

what should the user do if the container isn't running?

Copy link
Member Author

Choose a reason for hiding this comment

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

They should start it themselves, we want to avoid starting it for them here since we don't actually know what the container is doing (ex/ containers that create backups, cleanup tasks, ...)

@Talador12
Copy link

This PR is a requirement for SSH for containers
cloudflare/containers-demos#17
cloudflare/containers#86

After this is merged, we will update this PR

);
}

if (key.public_key.toLowerCase().startsWith("ssh-ed25519")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we wanna have this check here, it's not unlikely that we end up supporting more key types and this would make it so you'd need to update wrangler in order to use them

Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main flakey5/cc-4634 might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-10582
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@emily-shen emily-shen added the skip-v3-pr Skip validation of presence of a v3 backport PR label Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-v3-pr Skip validation of presence of a v3 backport PR
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

4 participants