classify-client/Dockerfile

29 строки
563 B
Docker
Исходник Обычный вид История

2018-12-11 01:54:52 +03:00
FROM rust:1.31-slim-stretch as build
2018-12-21 16:16:51 +03:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
pkg-config curl libssl-dev
2018-12-11 01:54:52 +03:00
WORKDIR /app
COPY . /app
RUN cargo build --release
# -----
FROM debian:stretch-slim as production
2018-12-21 16:16:51 +03:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
2018-12-21 22:15:32 +03:00
libssl1.1
2018-12-21 16:16:51 +03:00
2018-12-11 01:54:52 +03:00
WORKDIR /app
COPY --from=build /app/target/release/classify-client .
2018-12-21 16:16:51 +03:00
COPY --from=build /app/GeoLite2-Country.mmdb ./
COPY --from=build /app/version.json ./
2018-12-11 01:54:52 +03:00
ENV PORT=8080
ENV HOST=0.0.0.0
EXPOSE $PORT
2018-12-21 16:16:51 +03:00
CMD ["/app/classify-client"]