Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Perform docker compose pull without running images #646

Open
lonix1 opened this issue Jun 13, 2023 · 3 comments
Open

[Docs] Perform docker compose pull without running images #646

lonix1 opened this issue Jun 13, 2023 · 3 comments
Labels
docker-compose-v1 Docker Compose v1

Comments

@lonix1
Copy link

lonix1 commented Jun 13, 2023

SUMMARY

For community.docker.docker_compose.

This issue was for running equivalent of $ docker compose pull - pulling images referenced in docker-compose.yml, without running them.

That issue was closed, and it appears that functionality was added.

But there are no docs for that behaviour.

Please advise the syntax, and update the docs for that module?

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

community.docker.docker_compose

ANSIBLE VERSION
core 2.14.6
@shantanoo-desai
Copy link

Thing you should note here is that community.docker.docker_compose is meant for Docker Compose v1 (which is written in python) and will be deprecated by Docker ending this month. The Issue you mention doesn't seem have any contributions made actually. It was just closed and the issue was moved.

The Docker Compose v2 has some drawbacks since it is completely re-written in Golang which breaks the community.docker.docker_compose module.

There is currently a draft PR #586 which will wrap around the Docker Compose v2 (essentially docker compose as opposed to docker-compose which is v1).

The better solution is to use ansible.builtin.command which will do the docker compose pull command for you at the moment.

@lonix1
Copy link
Author

lonix1 commented Jun 13, 2023

@shantanoo-desai Thanks I didn't realise it was still wrapping docker-compose rather than docker compose.

Yes I'm using the shell to do it manually, but wanted to do it more robustly with an ansible module.

@felixfontein felixfontein added the docker-compose-v1 Docker Compose v1 label Jun 14, 2023
@felixfontein
Copy link
Collaborator

This can now be done with the docker_compose_v2_pull module. (That one also uses the docker compose CLI.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker-compose-v1 Docker Compose v1
Projects
None yet
Development

No branches or pull requests

3 participants