feat(apisix): add Cloudron package
- Implements Apache APISIX packaging for Cloudron platform. - Includes Dockerfile, CloudronManifest.json, and start.sh. - Configured to use Cloudron's etcd addon. 🤖 Generated with Gemini CLI Co-Authored-By: Gemini <noreply@google.com>
This commit is contained in:
58
CloudronPackages/APISIX/Dockerfile
Normal file
58
CloudronPackages/APISIX/Dockerfile
Normal file
@@ -0,0 +1,58 @@
|
||||
FROM cloudron/base:4.2.0 AS build
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV ENV_INST_LUADIR=/usr/local/apisix
|
||||
|
||||
COPY apisix-source /apisix
|
||||
|
||||
WORKDIR /apisix
|
||||
|
||||
RUN set -x
|
||||
&& apt-get -y update --fix-missing
|
||||
&& apt-get install -y
|
||||
make
|
||||
git
|
||||
sudo
|
||||
libyaml-dev
|
||||
libldap2-dev
|
||||
&& make deps
|
||||
&& mkdir -p ${ENV_INST_LUADIR}
|
||||
&& cp -r deps ${ENV_INST_LUADIR}
|
||||
&& make install
|
||||
|
||||
FROM cloudron/base:4.2.0
|
||||
|
||||
# Install the runtime libyaml package
|
||||
RUN apt-get -y update --fix-missing
|
||||
&& apt-get install -y libyaml-0-2
|
||||
&& apt-get remove --purge --auto-remove -y
|
||||
&& mkdir -p /usr/local/apisix/ui
|
||||
|
||||
COPY --from=build /usr/local/apisix /usr/local/apisix
|
||||
COPY --from=build /usr/local/openresty /usr/local/openresty
|
||||
COPY --from=build /usr/bin/apisix /usr/bin/apisix
|
||||
# Assuming UI files are in apisix-source/ui, adjust if needed
|
||||
COPY apisix-source/ui/ /usr/local/apisix/ui/
|
||||
|
||||
# Install brotli (from upstream install-brotli.sh)
|
||||
RUN apt-get update && apt-get install -y
|
||||
libbrotli-dev
|
||||
--no-install-recommends &&
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
|
||||
|
||||
WORKDIR /usr/local/apisix
|
||||
|
||||
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 our custom start.sh
|
||||
COPY start.sh /usr/local/bin/start.sh
|
||||
RUN chmod +x /usr/local/bin/start.sh
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/start.sh"]
|
||||
|
||||
STOPSIGNAL SIGQUIT
|
Reference in New Issue
Block a user