File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 11# See https://hub.docker.com/_/rust/
22
3- # # This configuration results in a large image with Rust tooling
4- # FROM rust:1.44
5- #
6- # WORKDIR /usr/src/newdoc
7- # COPY . .
8- #
9- # RUN cargo install --path .
10- #
11- # # CMD ["newdoc"]
12- # ENTRYPOINT ["newdoc"]
3+ # This version of the container is distroless. It includes no package manager.
4+ # If you need to extend the functionality, use the container defined in
5+ # the Dockerfile-distro file.
136
147FROM rust:latest as builder
158WORKDIR /usr/src/newdoc
Original file line number Diff line number Diff line change 1+ # See https://hub.docker.com/_/rust/
2+
3+ # This version of the container includes a package manager,
4+ # if you need to extend the functionality in your workflow.
5+
6+ FROM rust:latest as builder
7+ WORKDIR /usr/src/newdoc
8+ COPY . .
9+ RUN cargo install --path .
10+
11+ FROM registry.access.redhat.com/ubi9-minimal:latest
12+ COPY --from=builder /usr/local/cargo/bin/newdoc /usr/local/bin/newdoc
13+ # When running this container interactively, use `-v .:/mnt/newdoc:Z`
14+ # to mount the current directory in the host to the container working dir.
15+ VOLUME ["/mnt/newdoc"]
16+ WORKDIR "/mnt/newdoc"
17+ CMD ["newdoc"]
You can’t perform that action at this time.
0 commit comments