ARG BASE_IMAGE=docker.io/kong/kong-gateway:2.8.1.0-alpine
FROM $BASE_IMAGE
USER root

RUN apk update
RUN apk add jq curl aws-cli

RUN mkdir /scripts
RUN mkdir /certs
COPY scripts /scripts
RUN chown -R kong:kong /scripts
RUN chown -R kong:kong /certs
USER kong
VOLUME ["/certs"]