-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (20 loc) · 799 Bytes
/
Dockerfile
File metadata and controls
22 lines (20 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG rust_version
ARG debian_version=bookworm
FROM docker.io/library/rust:${rust_version}-slim-${debian_version} as builder
WORKDIR /usr/src/myapp
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
COPY . .
RUN apt-get update --quiet --assume-yes \
&& apt-get install --quiet --assume-yes mold \
&& cargo install --locked --path .
ARG debian_version
FROM docker.io/library/debian:${debian_version}-slim
RUN apt-get update --quiet --assume-yes \
&& apt-get install dumb-init --quiet --assume-yes \
&& mkdir /assets
COPY --from=builder /usr/local/cargo/bin/cosmere_search_web_server /usr/local/bin/cosmere_search_web_server
COPY ./assets/* /assets/
COPY ./input.json /input.json
EXPOSE 8080
EXPOSE 9091
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/cosmere_search_web_server"]