-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding SBOM fails with trying to send message larger than max (25286341 vs. 16777216): unknown #5327
Comments
Do you have example reproduction steps? |
Also, please post all buildkit version information as something like this was already fixed quite a long time ago. |
I haven't had the chance to build a reproduction Dockerfile, as the image I'm building is quite large, and includes some of our internal tools, I'll have to somehow work around those.
If there's a way to get the BuildKit version specifically I'd need you to point me in the right direction there. |
Here's the reproduction: & docker buildx build --no-cache -t buildkit-sbom:test --sbom=true -f .\Dockerfile --progress=plain . 2>&1 | Out-File docker-build.log Dockerfile: FROM ubuntu@sha256:8a37d68f4f73ebf3d4efafbcf66379bf3728902a8038616808f04e34a9ab63ee
# (24.04)
ENV DEBIAN_FRONTEND=noninteractive
# misc tools
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
openssh-client \
ca-certificates \
build-essential libz-dev zlib1g-dev \
git \
wget \
curl \
nano \
colorized-logs \
asciidoctor \
httpie \
unzip \
zip \
gpg \
lsb-release \
xz-utils \
rsync \
gettext-base \
genisoimage \
jq \
pip \
bridge-utils \
dhcping \
osslsigncode \
file\
iftop \
iperf3 \
iproute2 \
iptables \
iptraf-ng \
mtr \
mysql-client \
netcat-openbsd \
nftables \
ngrep \
nmap \
strace \
tcpdump \
iputils-ping \
python-is-python3 \
libxml2-utils \
python3-jmespath \
&& apt-get -y autoremove
# python
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.12 \
python3-pip \
python3.12-venv \
&& rm -rf /var/lib/apt/lists/*
# java
RUN mkdir -p /tmp/app && cd /tmp/app
RUN APP_DIR="/usr/local/bin/jdk-8" && \
APP_URL="https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u412-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u412b08.tar.gz" && \
echo "b9884a96f78543276a6399c3eb8c2fd8a80e6b432ea50e87d3d12d495d1d2808 app.tar.gz" > SHA256SUMS && \
wget --progress=bar:force:noscroll "${APP_URL}" -O app.tar.gz && \
sha256sum -c SHA256SUMS && \
mkdir -p "${APP_DIR}" && \
tar -x --strip-components 1 --directory "${APP_DIR}" -f app.tar.gz
RUN APP_DIR="/usr/local/bin/jdk-21" && \
APP_URL="https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz" && \
echo "fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340 app.tar.gz" > SHA256SUMS && \
wget --progress=bar:force:noscroll "${APP_URL}" -O app.tar.gz && \
sha256sum -c SHA256SUMS && \
mkdir -p "${APP_DIR}" && \
tar -x --strip-components 1 --directory "${APP_DIR}" -f app.tar.gz
RUN APP_DIR="/usr/local/bin/jdk-graalvm" && \
APP_URL="https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz" && \
DIGEST_URL="https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz.sha256" && \
sha256sum -c SHA256SUMS && \
wget --progress=bar:force:noscroll "${APP_URL}" -O app.tar.gz && \
wget --progress=bar:force:noscroll "${DIGEST_URL}" -O SHA256SUMS && echo " app.tar.gz" >> SHA256SUMS && \
sha256sum -c SHA256SUMS && \
mkdir -p "${APP_DIR}" && \
tar -x --strip-components 1 --directory "${APP_DIR}" -f app.tar.gz
RUN rm /usr/local/bin/jdk*/src.zip || true && \
rm /usr/local/bin/jdk*/lib/src.zip || true && \
rm -r /tmp/app
# go
RUN mkdir -p /tmp/app && cd /tmp/app
RUN APP_DIR="/usr/local/bin/go-1.23.1" && \
APP_URL="https://go.dev/dl/go1.23.1.linux-amd64.tar.gz" && \
echo "49bbb517cfa9eee677e1e7897f7cf9cfdbcf49e05f61984a2789136de359f9bd app.tar.gz" > SHA256SUMS && \
wget --progress=bar:force:noscroll "${APP_URL}" -O app.tar.gz && \
sha256sum -c SHA256SUMS && \
mkdir -p "${APP_DIR}" && \
tar -x --strip-components 1 --directory "${APP_DIR}" -f app.tar.gz && \
rm -rf ${APP_DIR}/api && \
ln -s ${APP_DIR} /usr/local/bin/go-latest && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /root/go/bin v1.61.0 && \
export PATH=$PATH:/root/go/bin && \
golangci-lint --version && \
rm -r /tmp/app
# node
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=18 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install --install-recommends -y nodejs
# cleanup
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get clean && \
apt-get autoremove -y --purge
the full output log: docker-build.log. |
I am having the same error after I enabling the "--sbom=true -o type=local,dest=out" |
@dreamworlds1234 Are you enabling containerd image store in Docker for I couldn't reproduce on mac, I get some warnings on sbom generation but otherwise seems to work fine:
|
@tonistiigi yeah those errors occur for me too. So I guess it's environment specific? What could it depend on? |
I created the builder (builderx) for cache purpose, and using it like this: docker buildx build --sbom=true -o type=local,dest=out -f config/docker/Dockerfile.prod . --tag testbuild --iidfile testbuildiidfile However, I found the error is related to the "containerd max message size", which can increase in the configuration for send and receive max size. However, what I don't understand is why sbom needs such large size, is it a bug in the docker/nerdcli? |
We don't have such configuration options in buildkitd config https://github.com/moby/buildkit/blob/master/cmd/buildkitd/config/config.go . If you mean containerd config then don't see how this is related to the buildx builder. You said you created builder instance with I see you are using |
@tonistiigi if it helps I'm using the containerd docker desktop registry. |
I have a quite specific use case:
I'm building a container which has a bunch of tools installed which is supposed to be used for CI runs.
When trying to add a SBOM during building (
docker buildx build --sbom=true
) the build succeeds but theexporting to image
step fails withMy best guess is, that this is happening due to the SBOM being too large.
The text was updated successfully, but these errors were encountered: