Update and refresh engine patches for version 24.0.5 #364
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoke Test | |
on: | |
pull_request: | |
push: | |
defaults: | |
run: | |
shell: 'bash -Eeuo pipefail -x {0}' | |
jobs: | |
smoke-test: | |
name: Snapcraft | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
# https://github.com/snapcore/action-build/releases | |
uses: snapcore/action-build@v1 | |
with: | |
snapcraft-args: snap --output docker.snap | |
- name: Upload | |
# TODO the goal of this "if:" condition is to avoid creating artifacts on private forks (and using up all their storage quota), but Tianon couldn't find a clean way to do that so this was the next best thing | |
if: github.repository == 'docker-snap/docker-snap' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docker.snap | |
path: docker.snap | |
- name: Prep | |
run: | | |
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md | |
# TODO figure out a better way to get Go and friends out of our path than dropping a nuke | |
sudo rm -rf /opt/hostedtoolcache/* | |
sudo apt-get purge --auto-remove -y 'docker.*' 'containerd.*' 'moby.*' 'runc.*' | |
sudo rm -rf /var/lib/docker /etc/docker /run/docker* /var/lib/containerd /run/containerd* | |
sudo ip link delete docker0 || : | |
sudo apt update | |
sudo apt install -y snapd | |
sudo snap refresh | |
sudo snap refresh --channel beta snapd | |
sudo snap list | |
- name: Install | |
run: | | |
sudo snap install --dangerous ./docker.snap | |
# it will immediately be failing to start, so let's head that off as quickly as we can | |
sudo snap stop --disable docker.dockerd | |
sudo killall dockerd || : | |
- name: Connect | |
run: | | |
echo '{ "log-level": "debug" }' | sudo tee /var/snap/docker/current/config/daemon.json | |
# normally, snap does this automatically during install, but not when we install from a local file (for security) | |
sudo snap connect docker:docker-cli docker:docker-daemon | |
sudo snap connect docker:firewall-control :firewall-control | |
sudo snap connect docker:home :home | |
sudo snap connect docker:network-control :network-control | |
sudo snap connect docker:support :docker-support | |
sudo snap connect docker:privileged :docker-support | |
sudo snap stop --disable docker.dockerd # for good measure | |
sleep 1 | |
sudo snap start --enable docker.dockerd | |
sleep 1 | |
sudo snap logs docker.dockerd | |
- name: Verify | |
run: | | |
trap 'ps faux | grep -i docker; sudo systemctl status snap.docker.dockerd.service' ERR | |
sudo dmesg | tail -n20 | |
sleep 1 | |
sudo snap logs -n=20 docker.dockerd | |
sleep 1 | |
sudo docker version | |
sudo docker info | |
sudo docker buildx version | |
sudo docker compose version | |
- name: Save & Load | |
run: | | |
docker pull hello-world | |
docker save hello-world > hello-world.tar | |
xz -T0 < hello-world.tar > hello-world.txz | |
docker rmi hello-world | |
docker load --input hello-world.txz | |
- name: Hello World | |
run: sudo docker run --rm hello-world | |
- name: Hello World (journald) | |
run: | | |
trap 'echo "error, sad day ($?)"; sleep 1; sudo snap logs -n=20 docker.dockerd; sleep 1; sudo tail -n20 /var/log/*.log; sudo dmesg | tail -n20; sudo journalctl --no-pager | grep DENIED | grep docker' ERR | |
expectedOutput="testing-journald-log-driver-$RANDOM-$RANDOM" | |
sudo docker run --name test-journald --log-driver journald bash -c 'echo "$@"' -- "$expectedOutput" | |
actualOutput="$(sudo docker logs test-journald)" | |
[ "$actualOutput" = "$expectedOutput" ] | |
docker rm test-journald | |
- name: Hello World (init) | |
run: sudo docker run --rm --init hello-world | |
- name: Docker Build | |
run: | | |
sudo docker build --pull -t debian-hello - <<'EOF' | |
FROM debian:buster-slim | |
RUN set -eux; \ | |
apt-get update; \ | |
apt-get install -y hello; \ | |
rm -rf /var/lib/apt/lists/* | |
CMD ["hello"] | |
EOF | |
sudo docker run --rm debian-hello | |
sudo docker image rm debian-hello | |
- name: Docker Build (git) | |
run: | | |
sudo docker build --pull -t tianon/gosleep https://github.com/tianon/gosleep.git | |
sudo docker run --rm tianon/gosleep gosleep --help | |
sudo docker image rm tianon/gosleep | |
- name: Docker BuildKit | |
run: | | |
trap 'echo "error, sad day ($?)"; sleep 1; sudo snap logs -n=20 docker.dockerd; sleep 1; sudo tail -n20 /var/log/*.log; sudo dmesg | tail -n20; sudo journalctl --no-pager | grep DENIED | grep docker' ERR | |
sudo DOCKER_BUILDKIT=1 docker build --pull -t debian-hello - <<'EOF' | |
FROM debian:buster-slim | |
RUN set -eux; \ | |
apt-get update; \ | |
apt-get install -y hello; \ | |
rm -rf /var/lib/apt/lists/* | |
CMD ["hello"] | |
EOF | |
sudo docker run --rm debian-hello | |
sudo docker image rm debian-hello | |
- name: Docker BuildKit (git) | |
run: | | |
sudo DOCKER_BUILDKIT=1 docker build --pull -t tianon/gosleep https://github.com/tianon/gosleep.git | |
sudo docker run --rm tianon/gosleep gosleep --help | |
sudo docker image rm tianon/gosleep |