Files
KNELProductionContainers/CloudronPackages/APISIX/Dockerfile
ReachableCEO e32e9288d1 feat(rathole,apisix): complete Rathole and APISIX Cloudron packages
- Fix Rathole download URL to use .zip format instead of .tar.gz
- Complete APISIX package using official apache/apisix:3.8.0-debian base image
- Add cloudron user creation for APISIX compatibility
- Both packages build successfully and follow KNELCloudron- naming convention
- Rathole: reverse proxy tunnel with proper binary download
- APISIX: API gateway with official Docker image base
2025-10-17 10:19:59 -05:00

45 lines
1.2 KiB
Docker

FROM apache/apisix:3.8.0-debian
# Metadata labels
LABEL org.opencontainers.image.title="Apache APISIX"
LABEL org.opencontainers.image.description="Cloudron package for Apache APISIX API Gateway"
LABEL org.opencontainers.image.source="https://github.com/apache/apisix"
# Switch to root to modify the image
USER root
# Install additional dependencies if needed
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create cloudron user
RUN useradd -r -s /bin/bash -d /app -m cloudron
# Create APISIX data directories
RUN mkdir -p /app/data/apisix && \
mkdir -p /app/data/apisix/logs && \
mkdir -p /app/data/apisix/conf && \
chown -R cloudron:cloudron /app/data
# Copy startup script
COPY start.sh /app/pkg/start.sh
RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh
# Switch to cloudron user
USER cloudron
# Expose APISIX ports
EXPOSE 9180 9080
# APISIX environment variables
ENV APISIX_HOME=/app/data/apisix \
APISIX_WORKDIR=/app/data/apisix \
APP_PORT=9180
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -fsS http://127.0.0.1:${APP_PORT}/apisix/admin/routes || exit 1
CMD ["/app/pkg/start.sh"]