upgrade_docker.go 664 B

1234567891011121314151617181920212223
  1. package cmd
  2. import (
  3. "context"
  4. "github.com/0xJacky/Nginx-UI/internal/docker"
  5. "github.com/uozi-tech/cosy/logger"
  6. "github.com/urfave/cli/v3"
  7. )
  8. // Command to be executed in the temporary container
  9. var UpgradeDockerStep2Command = &cli.Command{
  10. Name: "upgrade-docker-step2",
  11. Usage: "Execute the second step of Docker container upgrade (to be run inside the temp container)",
  12. Action: UpgradeDockerStep2,
  13. }
  14. // UpgradeDockerStep2 executes the second step in the temporary container
  15. func UpgradeDockerStep2(ctx context.Context, command *cli.Command) error {
  16. logger.Info("Starting Docker OTA upgrade step 2 from CLI...")
  17. return docker.UpgradeStepTwo(ctx)
  18. }