Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Openresty, Luarocks, OpenSSL, PCRE (#79) #80

Open
wants to merge 2 commits into
base: debian-1.17.8.2
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
194 changes: 109 additions & 85 deletions Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
FROM debian:buster-slim
# Use the official Go builder image as a builder stage
FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.17-buster AS builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH

RUN apt-get update && \
apt-get install -y curl make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV CONFIG_SUPERVISOR_VERSION 1.0.3
RUN mkdir -p /tmp/api-gateway \
&& cd /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-config-supervisor/archive/${CONFIG_SUPERVISOR_VERSION}.tar.gz | tar -C /tmp/api-gateway -xz

RUN cd /tmp/api-gateway/api-gateway-config-supervisor-${CONFIG_SUPERVISOR_VERSION} \
&& make setup \
&& go mod init \
&& go mod vendor \
&& CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags "-s" -a -installsuffix cgo -o api-gateway-config-supervisor ./ \
&& mv /tmp/api-gateway/api-gateway-config-supervisor-${CONFIG_SUPERVISOR_VERSION}/api-gateway-config-supervisor /tmp/

ARG _prefix=/usr/local
ARG _exec_prefix=/usr/local/api-gateway
Expand All @@ -8,10 +31,11 @@ ARG _sbindir=/usr/local/sbin

ARG TEST_NGINX_VERSION=0.26
# Docker Build Arguments
ARG RESTY_VERSION="1.17.8.2"
ARG RESTY_LUAROCKS_VERSION="2.4.3"
ARG RESTY_OPENSSL_VERSION="1.0.2k"
ARG RESTY_PCRE_VERSION="8.41"
ARG RESTY_VERSION="1.21.4.2"
ARG RESTY_LUAROCKS_VERSION="3.9.2"

# !!! Do not upgrade RESTY_OPENSSL_VERSION to "3.1.3". It will break the reload with OOM error. Other versions have not been tested.
ARG RESTY_OPENSSL_VERSION="1.1.1"
ARG RESTY_CONFIG_OPTIONS="\
--prefix=${_exec_prefix} \
--sbin-path=${_sbindir}/api-gateway \
Expand Down Expand Up @@ -46,7 +70,7 @@ ARG RESTY_CONFIG_OPTIONS="\
ARG RESTY_CONFIG_OPTIONS_MORE=""

# These are not intended to be user-specified
ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre=/tmp/pcre-${RESTY_PCRE_VERSION}"
ARG _RESTY_CONFIG_DEPS="--with-openssl=/tmp/openssl-${RESTY_OPENSSL_VERSION} --with-pcre"

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand All @@ -55,6 +79,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
ca-certificates \
curl \
gettext-base \
libpcre3-dev \
libgd-dev \
libgeoip-dev \
libncurses5-dev \
Expand All @@ -66,23 +91,25 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
git \
zlib1g-dev \
gcc \
python2.7 \
iproute2 \
htop \
&& ln -s /usr/bin/python2.7 /usr/bin/python \
&& readonly NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
&& cd /tmp \
&& curl -fSL https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
&& tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
&& curl -fSL https://ftp.pcre.org/pub/pcre/pcre-${RESTY_PCRE_VERSION}.tar.gz -o pcre-${RESTY_PCRE_VERSION}.tar.gz \
&& tar xzf pcre-${RESTY_PCRE_VERSION}.tar.gz \
&& curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
htop

RUN cd /tmp \
&& curl -fSLk https://www.openssl.org/source/openssl-${RESTY_OPENSSL_VERSION}.tar.gz -o openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
&& tar xzf openssl-${RESTY_OPENSSL_VERSION}.tar.gz

RUN cd /tmp \
&& curl -fSLk https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
&& tar xzf openresty-${RESTY_VERSION}.tar.gz \
&& cd /tmp/openresty-${RESTY_VERSION} \
&& cd openresty-${RESTY_VERSION} \
&& readonly NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
&& ./configure -j${NPROC} ${_RESTY_CONFIG_DEPS} ${RESTY_CONFIG_OPTIONS} ${RESTY_CONFIG_OPTIONS_MORE} \
&& make -j${NPROC} \
&& make -j${NPROC} install \
&& curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& make -j${NPROC} install

RUN echo " ... installing luarocks..." \
&& cd /tmp \
&& curl -fSLk https://github.com/luarocks/luarocks/archive/v${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& cd luarocks-${RESTY_LUAROCKS_VERSION} \
&& ./configure \
Expand All @@ -103,24 +130,23 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
openssl-${RESTY_OPENSSL_VERSION} \
openssl-${RESTY_OPENSSL_VERSION}.tar.gz \
openresty-${RESTY_VERSION}.tar.gz openresty-${RESTY_VERSION} \
pcre-${RESTY_PCRE_VERSION}.tar.gz pcre-${RESTY_PCRE_VERSION} \
rm -rf /var/lib/apt/lists/*

ARG LUA_RESTY_HTTP_VERSION=0.07
ARG LUA_RESTY_HTTP_VERSION=0.17.1
RUN echo " ... installing lua-resty-http..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/pintsized/lua-resty-http/archive/v${LUA_RESTY_HTTP_VERSION}.tar.gz -o /tmp/api-gateway/lua-resty-http-${LUA_RESTY_HTTP_VERSION}.tar.gz \
&& curl -Lk https://github.com/pintsized/lua-resty-http/archive/v${LUA_RESTY_HTTP_VERSION}.tar.gz -o /tmp/api-gateway/lua-resty-http-${LUA_RESTY_HTTP_VERSION}.tar.gz \
&& tar xzf /tmp/api-gateway/lua-resty-http-${LUA_RESTY_HTTP_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/lua-resty-http-${LUA_RESTY_HTTP_VERSION} \
&& make install \
LUA_LIB_DIR=${_exec_prefix}/lualib \
INSTALL=${_exec_prefix}/bin/resty-install \
&& rm -rf /tmp/api-gateway

ENV LUA_RESTY_IPUTILS_VERSION 0.2.0
ENV LUA_RESTY_IPUTILS_VERSION 0.3.0
RUN echo " ... installing lua-resty-iputils..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/hamishforbes/lua-resty-iputils/archive/v${LUA_RESTY_IPUTILS_VERSION}.tar.gz -o /tmp/api-gateway/lua-resty-iputils-${LUA_RESTY_IPUTILS_VERSION}.tar.gz \
&& curl -Lk https://github.com/hamishforbes/lua-resty-iputils/archive/v${LUA_RESTY_IPUTILS_VERSION}.tar.gz -o /tmp/api-gateway/lua-resty-iputils-${LUA_RESTY_IPUTILS_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/lua-resty-iputils-${LUA_RESTY_IPUTILS_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/lua-resty-iputils-${LUA_RESTY_IPUTILS_VERSION} \
&& export LUA_LIB_DIR=${_exec_prefix}/lualib \
Expand All @@ -129,46 +155,10 @@ RUN echo " ... installing lua-resty-iputils..." \
&& $INSTALL lib/resty/*.lua ${LUA_LIB_DIR}/resty/ \
&& rm -rf /tmp/api-gateway

ENV CONFIG_SUPERVISOR_VERSION 1.0.3
ENV GOPATH /usr/lib/go/bin
ENV GOBIN /usr/lib/go/bin
ENV PATH $PATH:/usr/lib/go/bin

RUN echo " ... installing go supervisor..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://golang.org/dl/go1.15.2.linux-amd64.tar.gz -o /tmp/api-gateway/go1.15.1.linux-amd64.tar.gz \
&& cd /tmp/api-gateway \
&& tar -xvf go1.15.1.linux-amd64.tar.gz \
&& mv go /usr/lib/go \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-config-supervisor/archive/${CONFIG_SUPERVISOR_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-config-supervisor-${CONFIG_SUPERVISOR_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-config-supervisor-${CONFIG_SUPERVISOR_VERSION}.tar.gz \
&& mkdir -p /tmp/go \
&& mv /tmp/api-gateway/api-gateway-config-supervisor-${CONFIG_SUPERVISOR_VERSION}/* /tmp/go \
&& cd /tmp/go \
&& make setup \
&& mkdir -p /tmp/go/Godeps/_workspace \
&& ln -s /tmp/go/vendor /tmp/go/Godeps/_workspace/src \
&& mkdir -p /tmp/go-src/src/github.com/adobe-apiplatform \
&& ln -s /tmp/go /tmp/go-src/src/github.com/adobe-apiplatform/api-gateway-config-supervisor \
&& go get github.com/tools/godep \
&& GOPATH=/tmp/go/vendor:/tmp/go-src CGO_ENABLED=0 GOOS=linux /usr/lib/go/bin/godep go build -ldflags "-s" -a -installsuffix cgo -o api-gateway-config-supervisor ./ \
&& mv /tmp/go/api-gateway-config-supervisor /usr/local/sbin/ \

&& echo " cleaning up ... " \
&& rm -rf /tmp/api-gateway \
&& rm -rf /usr/lib/go/bin/src \
&& rm -rf /tmp/go \
&& rm -rf /tmp/go-src \
&& rm -rf /usr/lib/go/bin/pkg/ \
&& rm -rf /usr/lib/go/bin/godep \
&& rm -rf /usr/lib/go \
&& rm -rf /usr/lib/gcc \
&& rm -rf /var/cache/apk/*

ENV HMAC_LUA_VERSION 1.0.0
RUN echo " ... installing api-gateway-hmac ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-hmac/archive/${HMAC_LUA_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-hmac-${HMAC_LUA_VERSION}.tar.gz \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-hmac/archive/${HMAC_LUA_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-hmac-${HMAC_LUA_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-hmac-${HMAC_LUA_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-hmac-${HMAC_LUA_VERSION} \
&& make install \
Expand All @@ -179,7 +169,7 @@ RUN echo " ... installing api-gateway-hmac ..." \
ENV CACHE_MANAGER_VERSION 1.0.1
RUN echo " ... installing api-gateway-cachemanager..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-cachemanager/archive/${CACHE_MANAGER_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-cachemanager-${CACHE_MANAGER_VERSION}.tar.gz \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-cachemanager/archive/${CACHE_MANAGER_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-cachemanager-${CACHE_MANAGER_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-cachemanager-${CACHE_MANAGER_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-cachemanager-${CACHE_MANAGER_VERSION} \
&& make install \
Expand All @@ -191,7 +181,7 @@ RUN echo " ... installing api-gateway-cachemanager..." \
ENV AWS_VERSION 1.7.1
RUN echo " ... installing api-gateway-aws ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-aws/archive/${AWS_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-aws-${AWS_VERSION}.tar.gz \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-aws/archive/${AWS_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-aws-${AWS_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-aws-${AWS_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-aws-${AWS_VERSION} \
&& make install \
Expand All @@ -200,22 +190,10 @@ RUN echo " ... installing api-gateway-aws ..." \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/api-gateway

ENV REQUEST_VALIDATION_VERSION 1.2.4
RUN echo " ... installing api-gateway-request-validation ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-request-validation/archive/${REQUEST_VALIDATION_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION} \
&& make install \
LUA_LIB_DIR=${_exec_prefix}/lualib \
INSTALL=${_exec_prefix}/bin/resty-install \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/api-gateway

ENV ASYNC_LOGGER_VERSION 1.0.1
RUN echo " ... installing api-gateway-async-logger ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-async-logger/archive/${ASYNC_LOGGER_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-async-logger-${ASYNC_LOGGER_VERSION}.tar.gz \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-async-logger/archive/${ASYNC_LOGGER_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-async-logger-${ASYNC_LOGGER_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-async-logger-${ASYNC_LOGGER_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-async-logger-${ASYNC_LOGGER_VERSION} \
&& make install \
Expand All @@ -227,7 +205,7 @@ RUN echo " ... installing api-gateway-async-logger ..." \
ENV REQUEST_TRACKING_VERSION 1.0.1
RUN echo " ... installing api-gateway-request-tracking ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -L https://github.com/adobe-apiplatform/api-gateway-request-tracking/archive/${REQUEST_TRACKING_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-request-tracking-${REQUEST_TRACKING_VERSION}.tar.gz \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-request-tracking/archive/${REQUEST_TRACKING_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-request-tracking-${REQUEST_TRACKING_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-request-tracking-${REQUEST_TRACKING_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-request-tracking-${REQUEST_TRACKING_VERSION} \
&& make install \
Expand All @@ -237,30 +215,76 @@ RUN echo " ... installing api-gateway-request-tracking ..." \

ENV RCLONE_VERSION=v1.49.4
RUN echo " ... installing rclone ... " \
&& curl -L https://github.com/ncw/rclone/releases/download/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip -o /tmp/rclone.zip \
&& curl -Lk https://github.com/ncw/rclone/releases/download/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-${TARGETOS}-${TARGETARCH}.zip -o /tmp/rclone.zip \
&& unzip /tmp/rclone.zip -d /tmp/ \
&& cp /tmp/rclone-${RCLONE_VERSION}-linux-amd64/rclone ${_prefix}/bin/ \
&& cp /tmp/rclone-${RCLONE_VERSION}-${TARGETOS}-${TARGETARCH}/rclone ${_prefix}/bin/ \
&& rm -rf /tmp/rclone* \
&& rm -rf /var/cache/apk/*

ENV PROMETHEUS_EXPORTER_VERSION=0.5.0
ENV PROMETHEUS_EXPORTER_VERSION=0.11.0
RUN echo " ... adding nginx-prometheus-exporter" \
&& mkdir -p /tmp/api-gateway \
&& cd /tmp/api-gateway/ \
&& curl -L https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v${PROMETHEUS_EXPORTER_VERSION}/nginx-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}-linux-amd64.tar.gz -o /tmp/api-gateway/nginx-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}-linux-amd64.tar.gz \
&& tar -zxf ./nginx-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}-linux-amd64.tar.gz \
&& curl -Lk https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v${PROMETHEUS_EXPORTER_VERSION}/nginx-prometheus-exporter_${PROMETHEUS_EXPORTER_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz -o /tmp/api-gateway/nginx-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz \
&& tar -zxf ./nginx-prometheus-exporter-${PROMETHEUS_EXPORTER_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz \
&& cp ./nginx-prometheus-exporter /etc/nginx-prometheus-exporter \
&& rm -rf /tmp/api-gateway

RUN echo " ... adding jq" \ \
&& curl -L -k -s -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \
RUN echo " ... adding jq" \
&& curl -L -k -s -o /usr/local/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.7/jq-${TARGETOS}-${TARGETARCH} \
&& chmod 755 ${_prefix}/bin/jq \
&& rm -rf /var/cache/apk/*

ENV REQUEST_VALIDATION_VERSION 1.3.22
RUN echo " ... installing api-gateway-request-validation ..." \
&& mkdir -p /tmp/api-gateway \
&& curl -Lk https://github.com/adobe-apiplatform/api-gateway-request-validation/archive/${REQUEST_VALIDATION_VERSION}.tar.gz -o /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION}.tar.gz \
&& tar -xf /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION}.tar.gz -C /tmp/api-gateway/ \
&& cd /tmp/api-gateway/api-gateway-request-validation-${REQUEST_VALIDATION_VERSION} \
&& make install \
LUA_LIB_DIR=${_exec_prefix}/lualib \
INSTALL=${_exec_prefix}/bin/resty-install \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/api-gateway

RUN apt-get -y remove --purge --allow-remove-essential make unzip gcc git zlib1g-dev build-essential \

RUN apt-get -y remove --purge --allow-remove-essential make unzip gcc git zlib1g-dev build-essential libpcre3-dev \
&& apt-get -y autoremove


# Final image stage
FROM --platform=${TARGETPLATFORM:-linux/amd64} debian:10-slim

COPY --from=builder /tmp/api-gateway-config-supervisor /usr/local/sbin/
COPY --from=builder /usr/local/api-gateway/ /usr/local/api-gateway/
COPY --from=builder /usr/local/sbin/api-gateway /usr/local/sbin/api-gateway
COPY --from=builder /etc/api-gateway/ /etc/api-gateway/
COPY --from=builder /var/log/ /var/log/
COPY --from=builder /var/run/ /var/run/
COPY --from=builder /usr/local/bin/rclone /usr/local/bin/rclone
COPY --from=builder /etc/nginx-prometheus-exporter /etc/nginx-prometheus-exporter
COPY --from=builder /usr/local/bin/jq /usr/local/bin/jq

RUN ln -sf /dev/stdout /var/log/api-gateway/error.log \
&& ln -sf /dev/stderr /var/log/api-gateway/error.log

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sudo \
ca-certificates \
curl \
gettext-base \
libgd-dev \
libpcre3-dev \
libgeoip-dev \
libncurses5-dev \
libperl-dev \
libreadline-dev \
libxslt1-dev \
gcc \
iproute2 \
htop

COPY init.sh /etc/init-container.sh

COPY api-gateway-config /etc/api-gateway
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ docker:
docker build -t adobeapiplatform/apigateway .

docker-debian:
docker build -t adobeapiplatform/apigateway-debian:1.17.8.2 -f Dockerfile-debian .
docker build -t adobeapiplatform/apigateway:10-debian-1.21.4.2 -f Dockerfile-debian .

docker-debian-multiarch:
docker buildx build --platform linux/amd64,linux/arm64 --push -t adobeapiplatform/apigateway:buster-v1.21.4.2-validation-v1.3.22-multiarch -f Dockerfile-debian .

.PHONY: docker-ssh
docker-ssh:
Expand Down
36 changes: 20 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
gateway:
image: adobeapiplatform/apigateway
links:
- redis:redis.docker
volumes:
- ~/tmp/apiplatform/apigateway/api-gateway-config/:/etc/api-gateway
ports:
- "80:80"
- "9113:9113"
environment:
- LOG_LEVEL=info
- DEBUG=true
redis:
image: redis:2.8
ports:
- "6379:6379"
version: "3.9"
services:
gateway:
build:
context: ./
dockerfile: Dockerfile-debian
links:
- redis:redis.docker
volumes:
- ./api-gateway-config:/etc/api-gateway
ports:
- "80:80"
- "9113:9113"
environment:
- LOG_LEVEL=info
- DEBUG=true
redis:
image: redis:2.8
ports:
- "6379:6379"