Skip to content

Commit 34e35bb

Browse files
committed
Install cargo and binstall in docker
1 parent 7d7791c commit 34e35bb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

deployment/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ COPY . .
3838
RUN cargo build
3939

4040
# Stage 2: Run
41-
FROM ubuntu:22.04 as run
41+
FROM rust:1.84 as run
4242

4343
RUN apt-get update -y \
4444
&& apt-get install -y --no-install-recommends ca-certificates curl git libpq5 \
@@ -47,6 +47,8 @@ RUN apt-get update -y \
4747
&& apt-get clean -y \
4848
&& rm -rf /var/lib/apt/lists/*
4949

50+
RUN cargo install binstall
51+
5052
WORKDIR /root/
5153

5254
COPY --from=builder /usr/local/cargo/bin/forc-* .

src/handlers/upload.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ pub fn install_forc_at_path(forc_version: &str, forc_path: &Path) -> Result<(),
232232
.arg("--pkg-fmt=tgz")
233233
.arg(format!("forc@{forc_version}"))
234234
.output()
235-
.map_err(|_| UploadError::InvalidForcVersion(forc_version.to_string()))?;
235+
.map_err(|err| {
236+
error!("Failed to install forc with binstall: {:?}", err);
237+
UploadError::InvalidForcVersion(forc_version.to_string())
238+
})?;
236239

237240
if !output.status.success() {
238241
error!("Failed to install forc: {:?}", output);

0 commit comments

Comments
 (0)