From c325060e06f5d207619bc1bcea29dcf1c73fc5cb Mon Sep 17 00:00:00 2001 From: Nicolas Favre-Felix Date: Sat, 26 Aug 2023 08:04:51 -0700 Subject: [PATCH] Faster docker builds with make -j Build object files concurrently with `make -j`, applied to both build steps. The docker image builds almost twice as fast. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eb25acc6..542c6abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apk update && apk add wget make gcc libevent-dev msgpack-c-dev musl-dev open RUN wget -q https://api.github.com/repos/nicolasff/webdis/tags -O /dev/stdout | jq '.[] | .name' | head -1 | sed 's/"//g' > latest RUN wget https://github.com/nicolasff/webdis/archive/$(cat latest).tar.gz -O webdis-latest.tar.gz RUN tar -xvzf webdis-latest.tar.gz -RUN cd webdis-$(cat latest) && make && make install && make clean && make SSL=1 && cp webdis /usr/local/bin/webdis-ssl && cd .. +RUN cd webdis-$(cat latest) && make -j && make install && make clean && make -j SSL=1 && cp webdis /usr/local/bin/webdis-ssl && cd .. RUN sed -i -e 's/"daemonize":.*true,/"daemonize": false,/g' /etc/webdis.prod.json # main image