diff --git a/Dockerfile b/Dockerfile index 7477205..64a9d43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ USER root RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | tee /etc/apt/apt.conf.d/clean) &&\ apt-get update &&\ apt-get upgrade -y &&\ - apt-get install -y curl wget make git unzip gnupg software-properties-common jq &&\ + apt-get install -y curl wget make git unzip gnupg software-properties-common jq ca-certificates &&\ ## TerraForm (wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null) &&\ gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint &&\ @@ -24,7 +24,13 @@ RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true" chmod 700 get_helm.sh &&\ ./get_helm.sh &&\ rm ./get_helm.sh &&\ - + ## Docker + QEMU + buildx + install -m 0755 -d /etc/apt/keyrings &&\ + curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc &&\ + chmod a+r /etc/apt/keyrings/docker.asc &&\ + (echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null) &&\ + apt-get update &&\ + apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin qemu-user-static &&\ ## See https://github.com/actions/checkout/issues/956 groupmod -g 1000 runner && usermod -u 1000 runner diff --git a/README.md b/README.md index 8e7f83d..ee53729 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,6 @@ Also includes the following tools: * TerraForm * AWS CLI (v2) * Helm +* Docker + QEMU + BuildX Unlocks node v20 that is already available in the image diff --git a/test/test_docker.py b/test/test_docker.py new file mode 100644 index 0000000..b7d205c --- /dev/null +++ b/test/test_docker.py @@ -0,0 +1,5 @@ +import pytest + +def test_terraform(host): + assert 'Hello from Docker!' in host.run('docker run hello-world').stdout + assert 'This message shows that your installation appears to be working correctly.' in host.run('docker run hello-world').stdout