Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ FROM debian:bullseye-slim

ARG APISIX_VERSION=3.15.0

COPY ./install-brotli.sh /install-brotli.sh

RUN set -ex; \
arch=$(dpkg --print-architecture); \
apt update; \
Expand All @@ -33,28 +35,25 @@ RUN set -ex; \
wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
&& echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
;; \
esac; \
apt update \
esac \
&& apt update \
&& apt install -y apisix=${APISIX_VERSION}-0 \
&& apt-get purge -y --auto-remove \
&& rm /usr/local/openresty/bin/etcdctl \
&& openresty -V \
&& apisix version

COPY ./install-brotli.sh /install-brotli.sh
RUN chmod +x /install-brotli.sh \
&& cd / && ./install-brotli.sh && rm -rf /install-brotli.sh

RUN apt-get -y purge --auto-remove curl wget gnupg --allow-remove-essential
&& apisix version \
&& bash /install-brotli.sh \
&& rm -f /install-brotli.sh \
&& apt-get -y purge --auto-remove curl wget gnupg --allow-remove-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system --gid 636 apisix \
&& useradd --system --gid apisix --no-create-home --shell /usr/sbin/nologin --uid 636 apisix \
&& chown -R apisix:apisix /usr/local/apisix

WORKDIR /usr/local/apisix

ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin

RUN groupadd --system --gid 636 apisix \
&& useradd --system --gid apisix --no-create-home --shell /usr/sbin/nologin --uid 636 apisix \
&& chown -R apisix:apisix /usr/local/apisix

USER apisix

# forward request and error logs to docker log collector
Expand Down
32 changes: 18 additions & 14 deletions redhat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,31 @@ FROM registry.access.redhat.com/ubi9/ubi:9.6

ARG APISIX_VERSION=3.15.0
LABEL apisix_version="${APISIX_VERSION}"
COPY ./yum.repos.d/apache-apisix.repo /etc/yum.repos.d/apache-apisix.repo
COPY ./yum.repos.d/openresty.repo /etc/yum.repos.d/openresty.repo

RUN yum update -y \
&& yum install -y apisix-${APISIX_VERSION} wget\
&& yum clean all \
&& sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t60/g' /etc/login.defs
WORKDIR /usr/local/apisix

COPY ./yum.repos.d/apache-apisix.repo /etc/yum.repos.d/apache-apisix.repo
COPY ./yum.repos.d/openresty.repo /etc/yum.repos.d/openresty.repo
COPY ./install-brotli.sh /install-brotli.sh
RUN chmod +x /install-brotli.sh \
&& cd / && ./install-brotli.sh && rm -rf /install-brotli.sh

WORKDIR /usr/local/apisix
RUN set -ex; \
yum makecache -y \
&& yum install -y \
--setopt=install_weak_deps=False \
--setopt=tsflags=nodocs \
apisix-${APISIX_VERSION} wget\
&& sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t60/g' /etc/login.defs \
&& cd / && bash /install-brotli.sh \
&& rm -rf /install-brotli.sh \
# forward request and error logs to docker log collector
&& ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
&& ln -sf /dev/stderr /usr/local/apisix/logs/error.log \
&& rm /usr/local/openresty/bin/etcdctl \
&& yum clean all \
&& rm -rf /var/cache/dnf /var/cache/yum /var/lib/dnf/history.* /tmp/* /var/tmp/*

ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin

# 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 \
&& rm /usr/local/openresty/bin/etcdctl

EXPOSE 9080 9443

COPY ./docker-entrypoint.sh /docker-entrypoint.sh
Expand Down
30 changes: 15 additions & 15 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ FROM ubuntu:24.04

ARG APISIX_VERSION=3.15.0

COPY ./install-brotli.sh /install-brotli.sh

WORKDIR /usr/local/apisix

RUN set -ex; \
arch=$(dpkg --print-architecture); \
apt update; \
Expand All @@ -33,28 +37,24 @@ RUN set -ex; \
wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
&& echo "deb https://repos.apiseven.com/packages/arm64/ubuntu $VERSION_CODENAME main" | tee /etc/apt/sources.list.d/apisix.list \
;; \
esac; \
apt update \
esac \
&& apt update \
&& apt install -y apisix=${APISIX_VERSION}-0 \
&& apt-get purge -y --auto-remove \
&& rm /usr/local/openresty/bin/etcdctl \
&& openresty -V \
&& apisix version

COPY ./install-brotli.sh /install-brotli.sh
RUN chmod +x /install-brotli.sh \
&& cd / && ./install-brotli.sh && rm -rf /install-brotli.sh

RUN apt-get -y purge --auto-remove curl wget gnupg --allow-remove-essential
&& apisix version \
&& bash /install-brotli.sh \
&& rm -f /install-brotli.sh \
&& apt-get -y purge --auto-remove curl wget gnupg --allow-remove-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system --gid 636 apisix \
&& useradd --system --gid apisix --no-create-home --shell /usr/sbin/nologin --uid 636 apisix \
&& chown -R apisix:apisix /usr/local/apisix

WORKDIR /usr/local/apisix

ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin

RUN groupadd --system --gid 636 apisix \
&& useradd --system --gid apisix --no-create-home --shell /usr/sbin/nologin --uid 636 apisix \
&& chown -R apisix:apisix /usr/local/apisix

USER apisix

# forward request and error logs to docker log collector
Expand Down