Use Debian instead of Alpine in Dockerfile

This commit is contained in:
curquiza 2023-02-20 19:38:22 +01:00
parent 1e9ac00800
commit bddf3f96e6

View File

@ -1,7 +1,5 @@
# Compile # Compile
FROM rust:alpine3.16 AS compiler FROM rust:bullseye AS compiler
RUN apk add -q --update-cache --no-cache build-base openssl-dev
WORKDIR /meilisearch WORKDIR /meilisearch
@ -13,20 +11,20 @@ ENV RUSTFLAGS="-C target-feature=-crt-static"
COPY . . COPY . .
RUN set -eux; \ RUN set -eux; \
apkArch="$(apk --print-arch)"; \ arch="$(dpkg --print-architecture)"; \
if [ "$apkArch" = "aarch64" ]; then \ if [ "$arch" = "aarch64" ]; then \
export JEMALLOC_SYS_WITH_LG_PAGE=16; \ export JEMALLOC_SYS_WITH_LG_PAGE=16; \
fi && \ fi && \
cargo build --release cargo build --release
# Run # Run
FROM alpine:3.16 FROM debian:11.6
ENV MEILI_HTTP_ADDR 0.0.0.0:7700 ENV MEILI_HTTP_ADDR 0.0.0.0:7700
ENV MEILI_SERVER_PROVIDER docker ENV MEILI_SERVER_PROVIDER docker
RUN apk update --quiet \ RUN apt update -q \
&& apk add -q --no-cache libgcc tini curl && apt install -q -y tini
# add meilisearch to the `/bin` so you can run it from anywhere and it's easy # add meilisearch to the `/bin` so you can run it from anywhere and it's easy
# to find. # to find.