Repository navigation
Add -i and -t to run and exec - #9229
Merged
Merged
Conversation
Signed-off-by: Ulysses Souza <[email protected]>
ndeloof
reviewed
Mar 4, 2022
| runCmd.Flags().BoolVarP(&opts.noTty, "no-TTY", "T", false, "Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.") | ||
| runCmd.Flags().StringVarP(&opts.workingDir, "workdir", "w", "", "Path to workdir directory for this command.") | ||
|
|
||
| runCmd.Flags().BoolP("interactive", "i", true, "Keep STDIN open even if not attached. DEPRECATED") |
Contributor
There was a problem hiding this comment.
Those are not DEPRECATED, just on by default
(also, if we want to deprecate flag, should use flags.MarkDeprecated)
yahyatoubali
added a commit
to NadiCorporation/Crashwise
that referenced
this pull request
May 10, 2026
Build error on Yahya's machine after image build success:
ERROR: for crashwise-temporal 'ContainerConfig'
KeyError: 'ContainerConfig'
File "/usr/lib/python3/dist-packages/compose/service.py", line 1579
in get_container_data_volumes
container.image_config['ContainerConfig'].get('Volumes') or {}
Root cause: ``docker-compose`` v1.29.2 (the last release of the legacy
Python implementation) reads a ``ContainerConfig`` field that modern
Docker Engines (24.x+) no longer return. Tracking issue:
docker/compose#9229. This is NOT a CrashWise bug — it is a hard
incompatibility between two third-party tools that ship together on
older Ubuntu / system-pip installs.
Yahya's machine has only the legacy v1 standalone on PATH. The fix
is to migrate to the modern v2 plugin (``docker compose ...`` —
note the SPACE).
Changes:
1. ``check_runtime_docker_compose`` (crashwise/core/sentinel.py):
- Probe the v2 plugin (``docker compose version``) FIRST.
- When only legacy v1 is present, return CheckStatus.FAIL — NOT a
soft warning — because it WILL break the user's first
``docker compose up -d`` the moment they rebuild an image.
- Per-distro migration commands:
Arch: sudo pacman -Syu docker docker-compose docker-buildx
Ubuntu: sudo apt-get remove docker-compose &&
sudo apt-get install docker-compose-plugin
Fedora: sudo dnf install docker-compose-plugin &&
sudo dnf remove python3-docker-compose
- Permissive on unrecognised standalone versions (don't penalise
a self-built v2-compatible binary).
2. ``docs/INSTALL.md``:
- New prominent warning at the top of the "Running your first
campaign" section.
- New troubleshooting entry "Legacy docker-compose v1 — KeyError:
'ContainerConfig'" with the full migration recipe and links to
docker/compose#9229.
3. ``README.md``:
- Quick Start "One-Command Stack" section now opens with a docker
compose v2 warning that links to the INSTALL guide.
4. ``tests/unit/test_sentinel.py``:
- Updated ``test_check_runtime_docker_compose_*`` suite:
- Renamed ``ok_standalone`` → ``legacy_v1_is_fail`` (asserts the
new policy).
- Added ``ok_v2_plugin`` test for the happy path.
- Added ``unfamiliar_version_is_ok`` test for forward-compat.
- All 63 sentinel tests pass; 99/99 on touched surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Add
-iand-tto commandsrunandexecas hidden options, since they are not used.This is just to avoid breakage on scripts or old usages from users.
Related issue
Resolves #9207