You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "SilentEntity (via GitHub)" <gi...@apache.org> on 2023/12/21 09:00:16 UTC
[I] Enabling brotli for debian [apisix-docker]
SilentEntity opened a new issue, #530:
URL: https://github.com/apache/apisix-docker/issues/530
There is a requirement to install brotli in OS for it to work.
For local/master build development, here is an example:
Inside [Dockerfile](https://github.com/apache/apisix-docker/blob/master/debian-dev/Dockerfile), these are the following things that need to be done.
- Correct openresty path for apisix installation.
- Install brotli
Example for adding path of openresty:
```
FROM api7/apisix-runtime:dev AS build
ARG ENABLE_PROXY=false
ENV DEBIAN_FRONTEND noninteractive
ENV PATH=$PATH:/usr/local/openresty/bin
```
Example for installing brotli using script `install-brotli.sh`:
```
FROM api7/apisix-runtime:dev AS production-stage
COPY --from=build /usr/local/apisix /usr/local/apisix
COPY --from=build /usr/bin/apisix /usr/bin/apisix
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update --fix-missing \
&& apt-get install -y \
libldap2-dev \
&& apt-get remove --purge --auto-remove -y
COPY install-brotli.sh /install-brotli.sh
RUN chmod +x /install-brotli.sh \
&& cd / && ./install-brotli.sh && rm -rf /install-brotli.sh
```
`install-brotli.sh` script:
```
install_brotli () {
apt-get install -y sudo cmake wget unzip
local BORTLI_VERSION="1.1.0"
wget -q https://github.com/google/brotli/archive/refs/tags/v${BORTLI_VERSION}.zip || exit -1
unzip v${BORTLI_VERSION}.zip && cd ./brotli-${BORTLI_VERSION} && mkdir build && cd build || exit -1
local CMAKE=$(command -v cmake3 > /dev/null 2>&1 && echo cmake3 || echo cmake) || exit -1
${CMAKE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/brotli .. || exit -1
sudo ${CMAKE} --build . --config Release --target install || exit -1
if [ -d "/usr/local/brotli/lib64" ]; then
echo /usr/local/brotli/lib64 | sudo tee /etc/ld.so.conf.d/brotli.conf
else
echo /usr/local/brotli/lib | sudo tee /etc/ld.so.conf.d/brotli.conf
fi
sudo ldconfig || exit -1
ln -sf /usr/local/brotli/bin/brotli /usr/bin/brotli
cd ../..
rm -rf brotli-${BORTLI_VERSION}
rm -rf /v${BORTLI_VERSION}.zip
export SUDO_FORCE_REMOVE=yes
apt purge -qy cmake sudo wget unzip
apt-get remove --purge --auto-remove -y
}
install_brotli
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Enabling brotli for debian [apisix-docker]
Posted by "SilentEntity (via GitHub)" <gi...@apache.org>.
SilentEntity commented on issue #530:
URL: https://github.com/apache/apisix-docker/issues/530#issuecomment-1870107620
Okay, I can do it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Enabling brotli for debian [apisix-docker]
Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
luoluoyuyu commented on issue #530:
URL: https://github.com/apache/apisix-docker/issues/530#issuecomment-1870918443
Hi @AlinsRan Please assign it to @SilentEntity
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Enabling brotli for debian and redhat [apisix-docker]
Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan closed issue #530: Enabling brotli for debian and redhat
URL: https://github.com/apache/apisix-docker/issues/530
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Enabling brotli for debian [apisix-docker]
Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
luoluoyuyu commented on issue #530:
URL: https://github.com/apache/apisix-docker/issues/530#issuecomment-1870097964
Hi @SilentEntity
Are you willing to finish the job
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org