bzp2010 commented on issue #7377:
URL: https://github.com/apache/apisix/issues/7377#issuecomment-1251877562

   OK, as a supplement, I provide my build script, which only adds the patching 
operation to the official script.
   
   ```
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   
   FROM debian:bullseye-slim
   
   ARG APISIX_VERSION=2.15.0
   
   COPY ./0001-fix-grpc-authority-header.patch 
/0001-fix-grpc-authority-header.patch
   
   RUN set -ex; \
       arch=$(dpkg --print-architecture); \
       apt update; \
       apt-get -y install --no-install-recommends wget gnupg ca-certificates 
git; \
       codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
       wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -; \
       case "${arch}" in \
         amd64) \
           echo "deb http://openresty.org/package/debian $codename openresty" | 
tee /etc/apt/sources.list.d/openresty.list \
           && wget -O - http://repos.apiseven.com/pubkey.gpg | apt-key add - \
           && echo "deb http://repos.apiseven.com/packages/debian $codename 
main" | tee /etc/apt/sources.list.d/apisix.list \
           ;; \
         arm64) \
           echo "deb http://openresty.org/package/arm64/debian $codename 
openresty" | tee /etc/apt/sources.list.d/openresty.list \
           && wget -O - http://repos.apiseven.com/pubkey.gpg | apt-key add - \
           && echo "deb http://repos.apiseven.com/packages/arm64/debian 
$codename main" | tee /etc/apt/sources.list.d/apisix.list \
           ;; \
       esac; \
       apt update \
       && apt install -y apisix=${APISIX_VERSION}-0 \
       && rm -f /etc/apt/sources.list.d/openresty.list 
/etc/apt/sources.list.d/apisix.list \
       && openresty -V \
       && apisix version \
       && cd /usr/local/apisix && git apply 
/0001-fix-grpc-authority-header.patch && cat apisix/cli/ngx_tpl.lua \
       && apt-get purge -y --auto-remove
   
   WORKDIR /usr/local/apisix
   
   # forward request and error logs to docker log collector
   RUN ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
       && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
   
   EXPOSE 9080 9443
   
   COPY ./docker-entrypoint.sh /docker-entrypoint.sh
   
   ENTRYPOINT ["/docker-entrypoint.sh"]
   
   CMD ["docker-start"]
   
   
   STOPSIGNAL SIGQUIT
   ```
   
   Here's what I added, in addition to that I installed git, which helped 
install the patch.
   ```
   cd /usr/local/apisix && git apply /0001-fix-grpc-authority-header.patch && 
cat apisix/cli/ngx_tpl.lua
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to