Skip to content

Commit

Permalink
Add QEMU, buildx and Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Nov 14, 2024
1 parent 475e38e commit f0d8514
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&\
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions test/test_docker.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f0d8514

Please sign in to comment.