Now I am building a new docker image for my substrate node
Docker version 24.0.5, build ced0996
Node version v18.16.1
I am using this Dockerfile.dev
to build the docker image.
FROM paritytech/ci-linux:production as build
WORKDIR /code
COPY . .
RUN cargo build --release
FROM ubuntu:22.04
WORKDIR /node
# Copy the node binary.
COPY --from=build /code/target/release/node-template .
# Install root certs, see: https://github.com/paritytech/substrate/issues/9984
# RUN apt update && \
# apt install -y ca-certificates && \
# update-ca-certificates && \
# apt remove ca-certificates -y && \
# rm -rf /var/lib/apt/lists/*
EXPOSE 9944
CMD [ "./node-template", "--dev" ]
By the way, I got this error and couldn't figure it out.
254.9 info: installing component 'rustfmt'
261.8 Updating git repository `https://github.com/paritytech/substrate.git`
648.1 error: failed to get `frame-benchmarking` as a dependency of package `node-template v4.0.0-dev (/code/node)`
648.1
648.1 Caused by:
648.1 failed to load source for dependency `frame-benchmarking`
648.1
648.1 Caused by:
648.1 Unable to update https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#98f2e345
648.1
648.1 Caused by:
648.1 object not found - no match for id (98f2e3451c9143278ec53c6718940aeabcd3b68a); class=Odb (9); code=NotFound (-3)
------
Dockerfile.dev:5
--------------------
3 | WORKDIR /code
4 | COPY . .
5 | >>> RUN cargo build --release
6 |
7 | FROM ubuntu:22.04
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not complete successfully: exit code: 101
Any kind of answers would be appreciated.
Thanks in advance.