Skip to content

Commit

Permalink
Upgrade Docker (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalgrimaud authored Jul 13, 2024
1 parent 67f2044 commit 62f74c1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ jobs:
docker exec -t containertest npm -v
- name: docker
run: |
docker exec -t containertest ansible-playbook docker.yml -e ansible_become_pass=jhipster -u jhipster
docker exec -t containertest ansible-playbook docker.yml -e ansible_become_pass=jhipster -u jhipster \
-e container_version=1.7.18-1 -e docker_version=27.0.3-1
docker exec -t containertest docker -v
docker exec -t containertest groups jhipster
- name: docker-compose
run: |
docker exec -t containertest ansible-playbook dockercompose.yml -e ansible_become_pass=jhipster -e docker_compose_version=2.5.1
docker exec -t containertest ansible-playbook dockercompose.yml -e ansible_become_pass=jhipster -e docker_compose_version=2.28.1
docker exec -t containertest docker-compose version
9 changes: 9 additions & 0 deletions playbooks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@
- hosts: localhost
roles:
- docker
vars_prompt:
- name: container_version
prompt: 'Choose your container.io version'
default: '1.7.18-1'
private: no
- name: docker_version
prompt: 'Choose your Docker version'
default: '27.0.3-1'
private: no
2 changes: 1 addition & 1 deletion playbooks/dockercompose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
vars_prompt:
name: docker_compose_version
prompt: 'Choose your Docker-Compose version'
default: '2.5.1'
default: '2.28.1'
private: no
12 changes: 6 additions & 6 deletions playbooks/roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
- name: Download container.io
get_url:
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.6.21-1_amd64.deb'
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_{{container_version}}_amd64.deb'
dest: /tmp/

- name: Download docker-ce-cli
get_url:
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_24.0.1-1~ubuntu.22.04~jammy_amd64.deb'
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_{{docker_version}}~ubuntu.22.04~jammy_amd64.deb'
dest: /tmp/
- name: Download docker-ce
get_url:
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_24.0.1-1~ubuntu.22.04~jammy_amd64.deb'
url: 'https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_{{docker_version}}~ubuntu.22.04~jammy_amd64.deb'
dest: /tmp/

- name: Install container.io
become: true
apt:
deb: /tmp/containerd.io_1.6.21-1_amd64.deb
deb: /tmp/containerd.io_{{container_version}}_amd64.deb
- name: Install docker-ce-cli
become: true
apt:
deb: /tmp/docker-ce-cli_24.0.1-1~ubuntu.22.04~jammy_amd64.deb
deb: /tmp/docker-ce-cli_{{docker_version}}~ubuntu.22.04~jammy_amd64.deb
- name: Install docker-ce
become: true
apt:
deb: /tmp/docker-ce_24.0.1-1~ubuntu.22.04~jammy_amd64.deb
deb: /tmp/docker-ce_{{docker_version}}~ubuntu.22.04~jammy_amd64.deb

- name: Add to Docker group
become: true
Expand Down

0 comments on commit 62f74c1

Please sign in to comment.