From e7e74c0099b5a37dc0758d88416d29747224f866 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 8 Jul 2024 21:53:58 +0800 Subject: [PATCH] Correct apk usages in Dockerfile There is no need to use apk with `update` or `--update-cache` when `--no-cache` is used, which will make sure the index is the latest, and leave no temporary files behind. --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b227e6fc..870b45307 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Compile FROM rust:1.75.0-alpine3.18 AS compiler -RUN apk add -q --update-cache --no-cache build-base openssl-dev +RUN apk add -q --no-cache build-base openssl-dev WORKDIR / @@ -25,8 +25,7 @@ FROM alpine:3.16 ENV MEILI_HTTP_ADDR 0.0.0.0:7700 ENV MEILI_SERVER_PROVIDER docker -RUN apk update --quiet \ - && apk add -q --no-cache libgcc tini curl +RUN apk add -q --no-cache libgcc tini curl # add meilisearch and meilitool to the `/bin` so you can run it from anywhere # and it's easy to find.