You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/10 02:13:47 UTC

[GitHub] [apisix-docker] 18300618319 commented on issue #220: apisix构建镜像,在镜像内编译时老是失败

18300618319 commented on issue #220:
URL: https://github.com/apache/apisix-docker/issues/220#issuecomment-916577715


   
   
   FROM openresty/openresty:1.19.3.1-alpine-fat AS production-stage
   
   COPY ./ ./apisix
   RUN set -x \
       && (/bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
       && apk add --no-cache --virtual .builddeps \
       automake \
       autoconf \
       libtool \
       pkgconfig \
       cmake \
       git \
       pcre \
       pcre-dev \
       && cd apisix \
       && make deps \
       && cp -v bin/apisix /usr/bin/ \
       && mv ../apisix /usr/local/apisix \
       && apk del .builddeps build-base make unzip
   
   FROM alpine:3.13 AS last-stage
   
   
   # add runtime for Apache APISIX
   RUN set -x \
       && (/bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
       && apk add --no-cache bash libstdc++ curl tzdata
   
   WORKDIR /home/zyb/apps/apisix
   
   COPY --from=production-stage /usr/local/openresty/ /usr/local/openresty/
   COPY --from=production-stage /usr/local/apisix/ /home/zyb/apps/apisix/
   COPY --from=production-stage /usr/bin/apisix /usr/bin/apisix
   
   # forward request and error logs to docker log collector
   RUN mkdir -p logs && touch logs/access.log && touch logs/error.log
   RUN ln -sf /home/zyb/apps/apisix/logs/access.log /home/logs/apisix/access.log
   RUN ln -sf /home/zyb/apps/apisix/logs/error.log  /home/logs/apisix/error.log
   
   ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
   
   EXPOSE 9080 9443 80
   
   CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
   
   STOPSIGNAL SIGQUIT
   


-- 
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