I’m trying to docker build .
a project, and my Docker desktop is running. I use node version 18, and the latest version of docker, so wsl is installed.
This is the error I get
=> ERROR [stage-1 2/6] ADD https://github.com/cartesi/machine-emulator-tools/releases/download/v0.14.1/mach
=> ERROR [stage-1 2/6] ADD https://github.com/cartesi/machine-emulator-tools/releases/download/v0.14.1/mach 16.6s
=> [internal] load build context 2.9s
=> => transferring context: 40.32kB 0.5s
=> CANCELED [build-stage 1/4] FROM docker.io/library/node:20.8.0-bookworm@sha256:21505ae2f9f4b29ad9091e6dfc 17.2s
=> => resolve docker.io/library/node:20.8.0-bookworm@sha256:21505ae2f9f4b29ad9091e6dfc6c56ef9e890a16fc38fe6f 1.2s
=> => sha256:21505ae2f9f4b29ad9091e6dfc6c56ef9e890a16fc38fe6f6cd9ba3e979ef37c 1.21kB / 1.21kB 0.0s
=> => sha256:8c7685c60f11acf445ece2e2859e77cf893495c9a13fb4cd9a53faebf74b155c 2.00kB / 2.00kB 0.0s
=> => sha256:4af97210304c2ebcf4491920a8358828f729e5b9f64b5801417ab6310834e02e 7.28kB / 7.28kB 0.0s
=> => sha256:1ccc26d841b4acc2562483bf393ce1cf8bc358ced09ccd825425226827c79c92 3.15MB / 24.05MB 18.8s
=> => sha256:800d84653581fc119cd75cd572fa190d3b813d49221b9e5ee463e3560e2cb342 0B / 64.13MB 18.8s
=> => sha256:0a9573503463fd3166b5b1f34a7720dac28609e98d731e50e7068f92e79b8545 0B / 49.58MB 18.8s
=> CANCELED [stage-1 1/6] FROM docker.io/cartesi/node:20.8.0-jammy-slim@sha256:47b872074fd14b8ff23452a7e288 16.5s
=> => resolve docker.io/cartesi/node:20.8.0-jammy-slim@sha256:47b872074fd14b8ff23452a7e2886ff91675671f00d0ca 1.2s
=> => sha256:47b872074fd14b8ff23452a7e2886ff91675671f00d0ca8b9943edc7f6cf3198 858B / 858B 0.0s
=> => sha256:797ca13233dcf47253a24b6822e1c403a89be6b5b615b5ee2c6a8e0aa0b310b4 1.24kB / 1.24kB 0.0s
=> => sha256:d0b8014fddda7a9d2aebfa90f785a751d55eaaad84bb1f1ca8175fc605f51529 5.87kB / 5.87kB 0.0s
------
> [stage-1 2/6] ADD https://github.com/cartesi/machine-emulator-tools/releases/download/v0.14.1/machine-emulator-tools-v0.14.1.deb /:
------
1 warning found (use --debug to expand):
- FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/riscv64" (line 20)
ERROR: failed to solve: failed to load cache key: Get "https://objects.githubusercontent.com/github-production-release-asset-2e65be/259441190/c749f65b-4947-46b6-8107-2e4ca48d9095?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240731%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240731T173331Z&X-Amz-Expires=300&X-Amz-Signature=bf720b93fcd65af89595e95e23062de8f1f6c4807403315dad6fa759c8fe2ccf&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=259441190&response-content-disposition=attachment%3B%20filename%3Dmachine-emulator-tools-v0.14.1.deb&response-content-type=application%2Foctet-stream": net/http: TLS handshake timeout
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/xrdqypgb7ei3twcxds2e9xq3r
I don’t know if it’s a network connection problem, which I’m sure my connection is fine.
This is how my Dockerfile looks like
# syntax=docker.io/docker/dockerfile:1
# build stage: includes resources necessary for installing dependencies
# Here the image's platform does not necessarily have to be riscv64.
# If any needed dependencies rely on native binaries, you must use
# a riscv64 image such as cartesi/node:20-jammy for the build stage,
# to ensure that the appropriate binaries will be generated.
FROM node:20.8.0-bookworm AS build-stage
WORKDIR /opt/cartesi/dapp
COPY . .
RUN yarn install && yarn build
# runtime stage: produces final image that will be executed
# Here the image's platform MUST be linux/riscv64.
# Give preference to small base images, which lead to better start-up
# performance when loading the Cartesi Machine.
FROM --platform=linux/riscv64 cartesi/node:20.8.0-jammy-slim
ARG MACHINE_EMULATOR_TOOLS_VERSION=0.14.1
ADD https://github.com/cartesi/machine-emulator-tools/releases/download/v${MACHINE_EMULATOR_TOOLS_VERSION}/machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb /
RUN dpkg -i /machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb
&& rm /machine-emulator-tools-v${MACHINE_EMULATOR_TOOLS_VERSION}.deb
LABEL io.cartesi.rollups.sdk_version=0.9.0
LABEL io.cartesi.rollups.ram_size=128Mi
ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
set -e
apt-get update
apt-get install -y --no-install-recommends
busybox-static=1:1.30.1-7ubuntu3
rm -rf /var/lib/apt/lists/* /var/log/* /var/cache/*
useradd --create-home --user-group dapp
EOF
ENV PATH="/opt/cartesi/bin:${PATH}"
WORKDIR /opt/cartesi/dapp
COPY --from=build-stage /opt/cartesi/dapp/dist .
ENV ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004"
ENTRYPOINT ["rollup-init"]
CMD ["node", "index.js"]
Any suggestions?