Skip to content

INT-7183: Use Docker CLI#5

Open
pavancse17 wants to merge 5 commits intoScienceLogic:mainfrom
pavancse17:main
Open

INT-7183: Use Docker CLI#5
pavancse17 wants to merge 5 commits intoScienceLogic:mainfrom
pavancse17:main

Conversation

@pavancse17
Copy link
Copy Markdown

@pavancse17 pavancse17 commented Apr 14, 2026

  • This PR replaces the docker v1 python library with docker cli tool.
  • Bumps the version to 1.1.0
  • Tested with python 3.8 & 3.11
> pytest
tests/test_stackconfig.py .....                                                                                     [100%]

==================================================== 5 passed in 0.31s ====================================================

Comment thread stackconfig/cli.py Outdated
remove_files(name_tmp_file)

if self.version and isinstance(self.version, str):
self.compose_dict["version"] = self.version
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If I still this stack config version along with old docker versions, would the deployment will fail ? with which version of docker this is not recognized anymore ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I got confused with changes between docker compose config & docker stack config.
docker compose config depricated the spec version's and it will be ignored while doing docker compose up

Compose v1 was first released in 2014. It was written in Python and invoked with docker-compose. Typically, Compose v1 projects include a top-level version element in the compose.yaml file, with values ranging from 2.0 to 3.8, which refer to the specific file formats.
Compose v2, announced in 2020, is written in Go and is invoked with docker compose. Unlike v1, Compose v2 ignores the version top-level element in the compose.yaml file and relies entirely on the Compose Specification to interpret the file.

Ref:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

But docker stack works differently.

The docker stack deploy command uses the legacy Compose file version 3 format, used by Compose V1. The latest format, defined by the Compose specification isn't compatible with the docker stack deploy command.

Ref: https://docs.docker.com/engine/swarm/stack-deploy/

@pavancse17 pavancse17 requested a review from favipcj April 22, 2026 09:12
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.

2 participants