Skip to content

Fix Docker container default command handling (#2226) - #2228

Open
fbccsz wants to merge 1 commit into
apache:trunkfrom
fbccsz:fix/docker-default-command
Open

fbccsz wants to merge 1 commit into
apache:trunkfrom
fbccsz:fix/docker-default-command

Conversation

@fbccsz

@fbccsz fbccsz commented Nov 14, 2026 •

Copy link
Copy Markdown

Description

Fixes #2226.

DockerContainerDriver.deploy_container() currently converts an omitted command into ['None'], overriding the image's default command.

This change omits Cmd when command is None, while preserving the existing parsing behavior for explicitly supplied command strings.

Regression tests cover omitted commands, explicit None, empty strings, whitespace and quoted arguments using the existing Linux and macOS Docker mock fixtures.

Status

Ready for review.

Validation performed in the [fork CI](https://github.com/fbccsz/libcloud/actions/runs/43597390983):

  • All six Python and PyPy test environments passed.
  • Lint, type checking, security checks and dependency review passed.
  • Documentation, release artifact and Docker image builds passed.
  • Coverage generation passed. Only the Codecov upload failed because the fork is not registered with Codecov.

No new dependencies or CI configuration changes.

Checklist

  • Code linting
  • Documentation
  • Tests
  • ICLA (small bug fix)

Omit Cmd when command is None and preserve explicit command strings.
Add regression coverage for omitted, empty and quoted commands.
Refs apache#2226
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.

Docker deploy_container sends literal None command when command is omitted

1 participant