From ae20f44d3fefdf2cdb01b06da00c1e12ecf7ba6c Mon Sep 17 00:00:00 2001 From: "tom.chivert" Date: Fri, 15 Sep 2023 11:27:20 +0200 Subject: [PATCH] Switch to docker-compose-plugin --- tasks/docker.yml | 13 +++---------- templates/systemd/docker-compose.service.j2 | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tasks/docker.yml b/tasks/docker.yml index c50e9fb..683740c 100644 --- a/tasks/docker.yml +++ b/tasks/docker.yml @@ -16,7 +16,8 @@ name: - docker-ce - docker-ce-cli - - docker-compose + - containerd.io + - docker-buildx-plugin state: present tags: ['docker'] @@ -27,14 +28,6 @@ mode: '0755' tags: ['docker'] -- name: install Python module - pip: - name: - - docker - - docker-compose - executable: pip3 - tags: ['docker'] - - name: ensure Docker is started and enabled at boot service: name: docker @@ -56,4 +49,4 @@ dest: /etc/logrotate.d/docker mode: '0644' force: yes - when: logrotate_docker is defined \ No newline at end of file + when: logrotate_docker is defined diff --git a/templates/systemd/docker-compose.service.j2 b/templates/systemd/docker-compose.service.j2 index 255a87f..f4aa2ed 100644 --- a/templates/systemd/docker-compose.service.j2 +++ b/templates/systemd/docker-compose.service.j2 @@ -7,8 +7,8 @@ After=docker.service Type=oneshot RemainAfterExit=true WorkingDirectory=/opt/docker-compose/{{ service }} -ExecStart=/usr/bin/docker-compose up -d -ExecStop=/usr/bin/docker-compose down +ExecStart=/usr/bin/docker compose up -d +ExecStop=/usr/bin/docker compose down [Install] WantedBy=multi-user.target