This reproduces moby/buildkit#1039
To reproduce:
- vagrant up
- vagrant ssh
- cd /tmp
- /vagrant/build-all-servers.sh
You should observe in the build logs that servers 2+3 are using the base image from server01 instead of what's defined in the Dockerfile.
This reproduces moby/buildkit#1039
To reproduce:
You should observe in the build logs that servers 2+3 are using the base image from server01 instead of what's defined in the Dockerfile.
#!/bin/bash | |
set -exuo pipefail | |
cd /tmp/server01/ | |
cat Dockerfile | |
PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 docker build \ | |
--progress plain -t test-bk-1:server01 -f Dockerfile . | |
cd ../server02/ | |
cat Dockerfile | |
PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 docker build \ | |
--progress plain -t test-bk:server02 -f Dockerfile . | |
cd ../server03/ | |
cat Dockerfile | |
PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 docker build \ | |
--progress plain -t test-bk:server03 -f Dockerfile . |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
# Setup prerequisites | |
config.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update | |
apt-get install -y docker-ce docker-ce-cli containerd.io | |
usermod -aG docker vagrant | |
SHELL | |
# Write out test Dockerfiles | |
config.vm.provision "shell", inline: <<-SHELL | |
mkdir -p /tmp/server01 | |
echo "FROM python:3.6.5" > /tmp/server01/Dockerfile | |
mkdir -p /tmp/server02 | |
echo "FROM python:3.6.8" > /tmp/server02/Dockerfile | |
mkdir -p /tmp/server03 | |
echo "FROM python:3.6.9" > /tmp/server03/Dockerfile | |
SHELL | |
end |
If I change the script in the Vagrantfile above to add
sleep 2
between writing each Dockerfile the problem goes away. Maybe related to moby/buildkit#1368?