Skip to content

Conversation

zamderax
Copy link
Contributor

@zamderax zamderax commented Sep 5, 2025

Maps --restart=unless-stopped and --restart=no and --restart=on-failure:${number} to DockerCLI

  • Introduced StopContainer RPC in EdgeContainerService to stop running containers.
  • Added ContainerCommand with a Stop subcommand to facilitate stopping containers via CLI.
  • Enhanced ControlCommand to support stop operations and added restart policy options for container execution.
  • Updated DockerCLI to include stop functionality for Docker containers.
  • Modified RunContainerRequestHandler to handle stopping containers and manage their state effectively.

Note debug has --restart-no

Solves #52

…ifecycle

- Introduced StopContainer RPC in EdgeContainerService to stop running containers.
- Added ContainerCommand with a Stop subcommand to facilitate stopping containers via CLI.
- Enhanced ControlCommand to support stop operations and added restart policy options for container execution.
- Updated DockerCLI to include stop functionality for Docker containers.
- Modified RunContainerRequestHandler to handle stopping containers and manage their state effectively.
@zamderax zamderax changed the title Add StopContainer RPC and associated command for managing container l… Adding Restart and Stop Sep 5, 2025
Copy link
Collaborator

@Joannis Joannis 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!

@zamderax
Copy link
Contributor Author

The thing is I'm not sure if I'm on the right track.

@Joannis should I delete DockerCLI? Since we aren't using Docker?

  • I assume I should switch to Subprocess NerdCTL for Edge Agent calls
  • I'm also a bit stuck in that the dev-update-edge-agent.sh script never succeeds. Is this a problem?

@Joannis
Copy link
Collaborator

Joannis commented Sep 11, 2025

@zamderax I'd like to keep DockerCLI around, at least for now. It's also not the difficult part of this.

I don't know enough about NerdCTL to make a call there.
dev-update-edge-agent.sh should definitely work, that's an important issue

Copy link
Collaborator

@Joannis Joannis left a comment

Choose a reason for hiding this comment

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

This works!

@Joannis Joannis enabled auto-merge September 16, 2025 12:49
@Joannis
Copy link
Collaborator

Joannis commented Sep 17, 2025

@mihai-chiorean this can be reviewed as a whole now

# Conflicts:
#	Package.resolved
#	Sources/EdgeAgent/Services/AgentConfigService.swift
@Joannis Joannis merged commit 3bb3412 into main Sep 17, 2025
11 checks passed
@Joannis Joannis deleted the feat/restart branch September 17, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants