mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
#cloud-config
|
|
|
|
# Sources:
|
|
# - https://github.com/trajano/terraform-docker-swarm-aws/blob/master/common.cloud-config
|
|
|
|
# Add the official Docker repository.
|
|
#
|
|
# Got from the official installation guide at
|
|
# https://docs.docker.com/engine/install/rhel/#install-using-the-repository :
|
|
# yum install -y yum-utils && \
|
|
# yum-config-manager --add-repo \
|
|
# https://download.docker.com/linux/rhel/docker-ce.repo && \
|
|
# cat /etc/yum.repos.d/docker-ce.repo
|
|
#
|
|
# Sources:
|
|
# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#yum-add-repo
|
|
# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#adding-a-yum-repository
|
|
yum_repos:
|
|
docker-ce:
|
|
name: Docker CE Stable - $basearch
|
|
enabled: true
|
|
baseurl: https://download.docker.com/linux/rhel/$releasever/$basearch/stable
|
|
priority: 1
|
|
gpgcheck: true
|
|
gpgkey: https://download.docker.com/linux/rhel/gpg
|
|
|
|
# Install required packages.
|
|
# This will *always* update the list of packages, regardless of the value of the
|
|
# 'package_update' setting.
|
|
#
|
|
# docker-ce already depends on 'docker-ce-cli' and 'containerd.io'
|
|
#
|
|
# Sources:
|
|
# - https://cloudinit.readthedocs.io/en/latest/topics/modules.html#package-update-upgrade-install
|
|
# - https://cloudinit.readthedocs.io/en/latest/topics/examples.html#install-arbitrary-packages
|
|
packages:
|
|
- docker-ce
|
|
|
|
# Enable and start the service after installation
|
|
runcmd:
|
|
- systemctl daemon-reload
|
|
- systemctl enable --now docker.service
|