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

Use 'docker compose' command (without hiphen) #204

Closed
naub1n opened this issue Sep 1, 2023 · 11 comments
Closed

Use 'docker compose' command (without hiphen) #204

naub1n opened this issue Sep 1, 2023 · 11 comments
Assignees

Comments

@naub1n
Copy link

naub1n commented Sep 1, 2023

Hi,

Docker compose installation is not the same as Official docker compose installation.

docker compose command don't work.

docker: 'compose' is not a docker command.
See 'docker --help'

But 'docker-compose' command work well.

I add a task to create docker plugins directory and I change the destination path when downloading docker-compose:

- name: Create docker plugins directory
  file:
    path: "{{ docker_user_info.home }}/.docker/cli-plugins"
    state: directory
    owner: "{{ docker_user }}"
    group: "{{ docker_user }}"

- name: Download docker-compose
  become: true
  become_user: "{{ docker_user }}"
  ansible.builtin.get_url:
    url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_release }}/docker-compose-linux-x86_64"
    dest: "{{ docker_user_info.home }}/.docker/cli-plugins/docker-compose"
    checksum: sha256:{{ docker_compose_release_shasum }}
    owner: "{{ docker_user }}"
    mode: "0755"
  when: docker_compose
  tags:
    - docker-compose

Now I can use docker compose command.

@konstruktoid
Copy link
Owner

konstruktoid commented Sep 1, 2023

Hi @naub1nnicce catch, I'll update.
But a quick check: are you installing using docker_rootful: false (https://github.com/konstruktoid/ansible-role-docker-rootless/blob/main/defaults/main.yml#L12) and is {{ docker_user_info.home }}/bin/docker-compose present?

@naub1n
Copy link
Author

naub1n commented Sep 1, 2023

Hi @naub1nnicce catch, I'll update. But a quick check: are you installing using docker_rootful: false (https://github.com/konstruktoid/ansible-role-docker-rootless/blob/main/defaults/main.yml#L12) and is {{ docker_user_info.home }}/bin/docker-compose present?

Yes, I only use:

docker_user: XXXXX
docker_user_bashrc: true
docker_allow_privileged_ports: true
docker_compose: true

is {{ docker_user_info.home }}/bin/docker-compose present?

Yes, because I don't erase VM. I will try with fresh install

@konstruktoid
Copy link
Owner

A PR will soon be available

@naub1n
Copy link
Author

naub1n commented Sep 1, 2023

I edit my answer with your second question :)

@konstruktoid
Copy link
Owner

is {{ docker_user_info.home }}/bin/docker-compose present?

Yes, because I don't erase VM. I will try with fresh install

yeah, i'll add so it's removed and replaced by a link pointing to /.docker/cli-plugins

@naub1n
Copy link
Author

naub1n commented Sep 1, 2023

After fresh install, {{ docker_user_info.home }}/bin/docker-compose is not present.

@konstruktoid
Copy link
Owner

what docker version do you have?

@naub1n
Copy link
Author

naub1n commented Sep 1, 2023

what docker version do you have?

Docker version 24.0.5, build ced0996

@konstruktoid
Copy link
Owner

Sorry for the long delay, can you test #205?

@naub1n
Copy link
Author

naub1n commented Sep 4, 2023

Sorry for the long delay, can you test #205?

No problem! ;) I test it on fresh install.
Everything work fine !!

@konstruktoid
Copy link
Owner

@naub1n naub1n closed this as completed Oct 9, 2023
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

No branches or pull requests

2 participants