#cloud-config

##
# Tested on:
#   - RHEL 8.6
##

yum_repos:
  docker-ce-stable:
    name: Docker CE Stable - $basearch
    enabled: true
    baseurl: https://download.docker.com/linux/centos/$releasever/$basearch/stable
    priority: 1
    gpgcheck: true
    gpgkey: https://download.docker.com/linux/centos/gpg

packages:
  - docker-ce  # brings in 'docker-ce-cli' and 'containerd.io' too
  - docker-compose-plugin

runcmd:
  - systemctl daemon-reload
  - systemctl enable --now docker.service
  - grep docker /etc/group -q && usermod -a -G docker ${docker_user}
