Skip to content

Commit

Permalink
Merge pull request #2275 from lfrancke/patch-1
Browse files Browse the repository at this point in the history
Update Rust versions in examples
  • Loading branch information
yosifkit authored Jan 27, 2023
2 parents 244d419 + 2996d00 commit aaa8020
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Rust is a systems programming language sponsored by Mozilla Research. It is desi
The most straightforward way to use this image is to use a Rust container as both the build and runtime environment. In your `Dockerfile`, writing something along the lines of the following will compile and run your project:

```dockerfile
FROM %%IMAGE%%:1.31
FROM %%IMAGE%%:1.67

WORKDIR /usr/src/myapp
COPY . .
Expand All @@ -33,12 +33,12 @@ $ docker run -it --rm --name my-running-app my-rust-app
This creates an image that has all of the rust tooling for the image, which is 1.8gb. If you just want the compiled application:

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

FROM debian:buster-slim
FROM debian:bullseye-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"]
Expand Down

0 comments on commit aaa8020

Please sign in to comment.