forked from roapi/roapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
18 lines (14 loc) · 671 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM instrumentisto/rust:nightly-bullseye-2022-09-24 AS builder
WORKDIR /roapi_src
COPY ./ /roapi_src
RUN apt-get update \
&& apt-get install --no-install-recommends -y cmake
RUN RUSTFLAGS='-C target-cpu=skylake' \
cargo +nightly install --locked --git https://github.com/roapi/roapi --branch main --bins roapi --features "simd database"
FROM debian:bullseye-slim
LABEL org.opencontainers.image.source https://github.com/roapi/roapi
RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
COPY test_data /test_data
COPY --from=builder /usr/local/cargo/bin/roapi /usr/local/bin/roapi
EXPOSE 8080
ENTRYPOINT ["roapi"]