Skip to content

Commit

Permalink
Faster docker builds with make -j
Browse files Browse the repository at this point in the history
Build object files concurrently with `make -j`, applied to both build
steps.
The docker image builds almost twice as fast.
  • Loading branch information
nicolasff committed Aug 26, 2023
1 parent 9a29a85 commit c325060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c325060

Please sign in to comment.