I have an M1 machine (arch arm64) and tI'mrying to build a docker-image with platform=linux/amd64
.
When I try to build from the terminal as follwoing:
docker build --platform linux/amd64 .
it works properly.When I try to build through
Skaffold
withskaffold buil
I get the error further below
### Skaffold.yaml, artifact build.
- image: $IMAGE
context: .
custom:
buildCommand: docker build --platform linux/amd64 .
PS: I have Rosetta2 installed properly and activated through my Docker-desktop.
It seems that Skaffold
is using QEMU
emulator instead of Rosetta 2
#6 97.59 debconf: delaying package configuration, since apt-utils is not installed #6 97.70 Fetched 35.6 MB in 57s (628 kB/s) #6 97.74 Error while loading /usr/sbin/dpkg-split: No such file or directory #6 97.75 Error while loading /usr/sbin/dpkg-deb: No such file or directory #6 97.75 dpkg: error processing archive /var/cache/apt/archives/libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb (--unpack): #6 97.75 dpkg-deb --control subprocess returned error exit status 1 #6 97.75 Error while loading /usr/sbin/dpkg-split: No such file or directory #6 97.75 Error while loading /usr/sbin/dpkg-deb: No such file or directory #6 97.75 dpkg: error processing archive /var/cache/apt/archives/libpython3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb (--unpack): #6 97.75 dpkg-deb --control subprocess returned error exit status 1 #6 97.76 Error while loading /usr/sbin/dpkg-split: No such file or directory #6 97.76 Error while loading /usr/sbin/dpkg-deb: No such file or directory #6 97.76 dpkg: error processing archive /var/cache/apt/archives/libexpat1_2.2.9-1ubuntu0.6_amd64.deb (--unpack): #6 97.76 dpkg-deb --control subprocess returned error exit status 1 #6 97.76 Error while loading /usr/sbin/dpkg-split: No such file or directory #6 97.77 Error while loading /usr/sbin/dpkg-deb: No such file or directory #6 97.77 dpkg: error processing archive /var/cache/apt/archives/python3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb (--unpack): #6 97.77 dpkg-deb --control subprocess returned error exit status 1 #6 97.78 Errors were encountered while processing: #6 97.78 /var/cache/apt/archives/libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb #6 97.78 /var/cache/apt/archives/libpython3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb #6 97.78 /var/cache/apt/archives/libexpat1_2.2.9-1ubuntu0.6_amd64.deb #6 97.78 /var/cache/apt/archives/python3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb #6 97.86 E: Sub-process /usr/bin/dpkg returned an error code (1) #6 ERROR: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository -y ppa:alex-p/tesseract-ocr5 && add-apt-repository -y ppa:reviczky/xxhash && apt-get update && apt-get install -y
libgl1 tesseract-ocr poppler-utils fonts-liberation
libtiff5-dev libjpeg-turbo8-dev libopenjp2-7-dev
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev
tcl8.6-dev tk8.6-dev python3-tk libharfbuzz-dev libfribidi-dev libxcb1-dev libspatialindex-dev python3-dev
wget make curl python3.8-venv git build-essential python-is-python3 xxhash && rm -rf /var/lib/apt/lists/]: exit code: 100 ------ > [the_img 2/37] RUN apt-get update && apt-get install -y software-properties-common && apt-get update &&
add-apt-repository -y ppa:alex-p/tesseract-ocr5 &&
add-apt-repository -y ppa:reviczky/xxhash && apt-get update &&
apt-get install -y libgl1 tesseract-ocr poppler-utils
fonts-liberation libtiff5-dev libjpeg-turbo8-dev
libopenjp2-7-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
libharfbuzz-dev libfribidi-dev libxcb1-dev libspatialindex-dev
python3-dev wget make curl python3.8-venv git
build-essential python-is-python3 xxhash && rm -rf /var/lib/apt/lists/: #6 97.76 Error while loading /usr/sbin/dpkg-split: No such file or directory #6 97.77 Error while loading /usr/sbin/dpkg-deb: No such file or directory #6 97.77 dpkg: error processing archive /var/cache/apt/archives/python3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb (--unpack): #6 97.77 dpkg-deb --control subprocess returned error exit status 1 #6 97.78 Errors were encountered while processing: #6 97.78 /var/cache/apt/archives/libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb #6 97.78 /var/cache/apt/archives/libpython3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb #6 97.78 /var/cache/apt/archives/libexpat1_2.2.9-1ubuntu0.6_amd64.deb #6 97.78 /var/cache/apt/archives/python3.8-minimal_3.8.10-0ubuntu1~20.04.7_amd64.deb #6 97.86 E: Sub-process /usr/bin/dpkg returned an error code (1) ------ ERROR: failed to solve: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c apt-get update && apt-get install -y software-properties-common && apt-get update &&
add-apt-repository -y ppa:alex-p/tesseract-ocr5 &&
add-apt-repository -y ppa:reviczky/xxhash && apt-get update &&
apt-get install -y libgl1 tesseract-ocr poppler-utils
fonts-liberation libtiff5-dev libjpeg-turbo8-dev
libopenjp2-7-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
libharfbuzz-dev libfribidi-dev libxcb1-dev libspatialindex-dev
python3-dev wget make curl python3.8-venv git
build-essential python-is-python3 xxhash && rm -rf /var/lib/apt/lists/*]: exit code: 100 Cleaning up... Error: uninstall: Release not loaded: keycloak: release: not found Error: uninstall: Release not loaded: proxy: release: not found Error: uninstall: Release not loaded: minio: release: not found Error: uninstall: Release not loaded: mock-model-registry: release: not found
- I have tried to run
arch -x86_64 skaffold build
. - I installed Rosetta 2 and activated it.
- It seems that Skaffold is using QEMU emulator instead of Rosetta 2
- I want to make sure
Skaffold
is using Rosetta 2