Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit b255388

Browse files
Magicloudketzacoatl
authored andcommitted
New module/init-snippet-install-docker-yum
Redhat/Centos based initialization script to install `docker` and `docker-compose`.
1 parent 056d102 commit b255388

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# init-snippet-install-docker-yum
2+
3+
Script for Redhat-alike Linux OS to install docker-ce and docker-compose.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
data "template_file" "init_snippet" {
2+
template = file("${path.module}/snippet.tpl")
3+
}
4+
5+
output "init_snippet" {
6+
value = data.template_file.init_snippet.rendered
7+
}
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
yum install -y yum-utils device-mapper-persistent-data lvm2
2+
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3+
yum install -y docker-ce docker-ce-cli containerd.io
4+
systemctl start docker
5+
curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
6+
chmod a+x /usr/bin/docker-compose

0 commit comments

Comments
 (0)