Skip to content

Commit

Permalink
Add ccache to PATH and use it for compiling nginx with Makefile in bu…
Browse files Browse the repository at this point in the history
…ild_nginx.sh script
  • Loading branch information
skrashevich committed Jun 22, 2023
1 parent 4882c12 commit 5450fb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker/build_nginx.sh
Expand Up @@ -16,7 +16,9 @@ apt-get -yqq build-dep nginx
apt-get -yqq install --no-install-recommends ca-certificates wget
update-ca-certificates -f
apt install -y ccache
CC="ccache gcc"

export PATH="/usr/lib/ccache:$PATH"

mkdir /tmp/nginx
wget -nv https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -zxf nginx-${NGINX_VERSION}.tar.gz -C /tmp/nginx --strip-components=1
Expand Down Expand Up @@ -64,5 +66,5 @@ cd /tmp/nginx
--add-module=../nginx-rtmp-module \
--with-cc-opt="-O3 -Wno-error=implicit-fallthrough"

make -j$(nproc) && make install
make CC="ccache gcc" -j$(nproc) && make install
rm -rf /usr/local/nginx/html /usr/local/nginx/conf/*.default

0 comments on commit 5450fb6

Please sign in to comment.