Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error building docker image for a simple rust application: extra-runtime-dependencies package not found?

Tags:

docker

rust

Anyone try building a rust image using the directions on docker hub? https://hub.docker.com/_/rust

FROM rust:1.40 as builder
WORKDIR /usr/src/myapp
COPY . .
RUN cargo install --path .

FROM debian:buster-slim
RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/myapp /usr/local/bin/myapp
CMD ["myapp"]

When I tried to build it using docker build -t myapp, I got an error:

 => CACHED [stage-1 1/3] FROM docker.io/library/debian:buster-slim@sha256:5dbce817ee72802025a38a388237b0ea576aa16  0.0s
 => ERROR [stage-1 2/3] RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/ap  5.4s
------
 > [stage-1 2/3] RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*:
#6 0.617 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
#6 0.698 Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
#6 0.731 Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
#6 0.875 Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7909 kB]
#6 1.700 Get:5 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [397 kB]
#6 1.734 Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
#6 2.708 Fetched 8529 kB in 2s (3802 kB/s)
#6 2.708 Reading package lists...
#6 3.432 Reading package lists...
#6 4.230 Building dependency tree...
#6 4.443 Reading state information...
#6 4.571 E: Unable to locate package extra-runtime-dependencies
------
executor failed running [/bin/sh -c apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*]: exit code: 100
like image 863
Blankman Avatar asked Dec 01 '25 10:12

Blankman


1 Answers

The rust documentation needs clarification on this, but extra-runtime-dependencies is a placeholder. Explanation is here

like image 70
Abhishek S Avatar answered Dec 03 '25 00:12

Abhishek S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!