Last active
February 23, 2024 05:35
-
-
Save magenx/757dce301efa81bfeb0aef2205ee981a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## install docker | |
dpkg-query -l docker >/dev/null || { | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
bash get-docker.sh | |
mkdir -p ~/.docker/cli-plugins/ | |
curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 \ | |
-o ~/.docker/cli-plugins/docker-compose | |
chmod +x ~/.docker/cli-plugins/docker-compose | |
} | |
export DOCKER_BUILDKIT=1 | |
docker build -t nginx:magenx-nginx-quic . | |
if [ "$?" != 0 ]; then | |
echo error | |
exit 1 | |
else | |
docker create --name export nginx:magenx-nginx-quic | |
/bin/systemctl stop nginx | |
docker cp export:/build/nginx-quic/objs/nginx /usr/sbin | |
docker rm -f export | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax = docker/dockerfile:labs | |
FROM debian | |
RUN <<EOF | |
apt-get update | |
apt-get install -y \ | |
git \ | |
gcc \ | |
make \ | |
autoconf \ | |
libtool \ | |
patch \ | |
perl \ | |
mercurial \ | |
libperl-dev \ | |
libpcre3-dev \ | |
zlib1g-dev \ | |
libxml2-dev \ | |
libgeoip-dev \ | |
libgd-dev | |
EOF | |
WORKDIR /build | |
RUN <<EOF | |
# get brotli code | |
git clone --recursive https://github.com/google/ngx_brotli.git brotli | |
EOF | |
RUN <<EOF | |
# get nginx with quic code | |
hg clone -b quic https://hg.nginx.org/nginx-quic | |
EOF | |
RUN <<EOF | |
# get libressl code | |
git clone -b v3.7.0 https://github.com/libressl-portable/portable.git libressl | |
cd libressl | |
./autogen.sh | |
EOF | |
RUN <<EOF | |
cd nginx-quic && \ | |
auto/configure \ | |
--build=magenx-nginx-quic \ | |
--prefix=/etc/nginx \ | |
--sbin-path=/usr/sbin/nginx \ | |
--modules-path=/usr/lib/nginx/modules \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/run/nginx.lock \ | |
--http-client-body-temp-path=/var/cache/nginx/client_temp \ | |
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \ | |
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \ | |
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \ | |
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \ | |
--user=nginx \ | |
--group=nginx \ | |
--with-openssl=/build/libressl \ | |
--with-http_ssl_module \ | |
--with-http_realip_module \ | |
--with-http_addition_module \ | |
--with-http_sub_module \ | |
--with-http_dav_module \ | |
--with-http_flv_module \ | |
--with-http_mp4_module \ | |
--with-http_gunzip_module \ | |
--with-http_gzip_static_module \ | |
--with-http_random_index_module \ | |
--with-http_secure_link_module \ | |
--with-http_stub_status_module \ | |
--with-http_auth_request_module \ | |
--with-http_image_filter_module \ | |
--with-http_geoip_module \ | |
--with-http_perl_module \ | |
--with-threads \ | |
--with-stream \ | |
--with-pcre-jit \ | |
--with-stream_ssl_module \ | |
--with-stream_ssl_preread_module \ | |
--with-stream_realip_module \ | |
--with-stream_geoip_module \ | |
--with-stream_quic_module \ | |
--with-http_slice_module \ | |
--with-mail \ | |
--with-mail_ssl_module \ | |
--with-compat \ | |
--with-file-aio \ | |
--with-http_v2_module \ | |
--with-http_v3_module \ | |
--add-module=/build/brotli | |
make | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment