Skip to content

Commit

Permalink
machines: use docker buildx (BuildKit) to build packages
Browse files Browse the repository at this point in the history
`docker build` has been deprecated and is being replaced with
`docker buildx build`:
https://docs.docker.com/reference/cli/docker/buildx/
  • Loading branch information
fishilico committed Aug 15, 2024
1 parent 67a512e commit 0c5c56b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fi
pacman --noconfirm -Su
# Make sure Python, Docker and other needed packages are installed
for PKG in docker gcc make pkgconf python
for PKG in docker docker-buildx gcc make pkgconf python
do
pacman -Qqi "$PKG" > /dev/null || pacman --noconfirm -S "$PKG"
done
Expand Down Expand Up @@ -84,7 +84,7 @@ cat > /etc/docker/daemon.json << EOF
EOF
systemctl enable --now docker
gpasswd -a vagrant docker
(docker images |grep -q '^archlinux ') || su vagrant -c 'docker build -t archlinux /vagrant/machines/archlinux'
(docker images |grep -q '^archlinux ') || su vagrant -c 'docker docker-buildx build -t archlinux /vagrant/machines/archlinux'
# Use vsyscall=emulate on the command line, for Debian 7 Wheezy
if [ -e /boot/syslinux/syslinux.cfg ] && ! grep vsyscall=emulate /boot/syslinux/syslinux.cfg > /dev/null
Expand Down
1 change: 1 addition & 0 deletions machines/base_install/archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ then
pkg clinfo
pkg codespell
pkg cppcheck
pkg docker-buildx
pkg docker-compose
pkg earlyoom
pkg flake8
Expand Down
4 changes: 2 additions & 2 deletions machines/docker_build_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ build_and_run() {
then
if "$DO_PRETEND"
then
echo "docker build -f 'Dockerfile-$BASE_NAME' -t '$IMAGE_NAME' .."
echo "docker buildx build -f 'Dockerfile-$BASE_NAME' -t '$IMAGE_NAME' .."
else
docker build -f "Dockerfile-$BASE_NAME" -t "$IMAGE_NAME" .. || return $?
docker buildx build -f "Dockerfile-$BASE_NAME" -t "$IMAGE_NAME" .. || return $?
fi
fi

Expand Down

0 comments on commit 0c5c56b

Please sign in to comment.