Dockerfile 757 B

1234567891011121314151617181920
  1. FROM centos:7
  2. ARG APISIX_VERSION=2.11.0
  3. LABEL apisix_version="${APISIX_VERSION}"
  4. RUN yum install -y https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm \
  5. && yum install -y https://repos.apiseven.com/packages/centos/7/x86_64/apisix-$APISIX_VERSION-0.el7.x86_64.rpm \
  6. && yum clean all \
  7. && sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t60/g' /etc/login.defs
  8. WORKDIR /usr/local/apisix
  9. # forward request and error logs to docker log collector
  10. RUN ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
  11. && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
  12. EXPOSE 9080 9443
  13. CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]