Skip to content

Commit

Permalink
Remove Alpine instructions from Docker install doc
Browse files Browse the repository at this point in the history
Signed-off-by: Diana <[email protected]>
  • Loading branch information
cloudjumpercat committed Aug 4, 2023
1 parent 38d5880 commit 215c185
Showing 1 changed file with 95 additions and 3 deletions.
98 changes: 95 additions & 3 deletions app/_src/gateway/install/docker/build-custom-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ content_type: how-to

Kong is distributed as prebuilt `apk`, `deb`, and `rpm` packages, in addition to official Docker images hosted on [DockerHub](https://hub.docker.com/r/kong)

Kong builds and verifies [Debian](#dockerhub-debian-link-here) and [RHEL](#dockerhub-rhel-link-here) images for use in production. [Alpine](#dockerhub-alpine-link-here) images are provided for **development purposes only** as they contain development tooling such as `git` for plugin development purposes.
Kong builds and verifies [Debian](#dockerhub-debian-link-here) and [RHEL](#dockerhub-rhel-link-here) images for use in production. {% if_version lte:3.3.x %}[Alpine](#dockerhub-alpine-link-here) images are provided for **development purposes only** as they contain development tooling such as `git` for plugin development purposes.{% endif_version %}

Our Debian and RHEL images are built with minimal dependencies (as of {{ site.base_gateway }} 3.0) and run through automated security scanners before being published. Any vulnerabilities detected in supported images will be addressed in the next available patch release.

Expand All @@ -25,13 +25,14 @@ chmod +x docker-entrypoint.sh
{% if_version eq:3.0.x %}
* **Alpine**: [.apk]({{ site.links.cloudsmith }}/public/gateway-{{ page.major_minor_version }}/raw/names/kong-enterprise-edition-x86_64/versions/{{page.versions.ee}}/kong-enterprise-edition-{{page.versions.ee}}.x86_64.apk.tar.gz)
{% endif_version %}
{% if_version lt:3.0.x gte:3.1.x %}
{% if_version lte:3.3.x %}
* **Alpine**: [.apk]({{ site.links.cloudsmith }}/public/gateway-{{ page.major_minor_version }}/alpine/any-version/main/x86_64/kong-enterprise-edition-{{page.versions.ee}}.apk)
{% endif_version %}
* **RHEL**:[ .rpm]({{ site.links.cloudsmith }}/public/gateway-{{ page.major_minor_version }}/rpm/el/8/x86_64/kong-enterprise-edition-{{page.versions.ee}}.el8.x86_64.rpm)

1. Create a `Dockerfile`, ensuring you replace the filename by the first `COPY` with the name of the {{site.base_gateway}} file you downloaded in step 2:

{% if_version lte:3.3.x %}
{% capture dockerfile_run_steps %}COPY docker-entrypoint.sh /docker-entrypoint.sh

USER kong
Expand Down Expand Up @@ -118,7 +119,6 @@ RUN set -ex; \
{{ dockerfile_run_steps }}
```
{% endnavtab %}

{% navtab Alpine %}
```dockerfile

Expand All @@ -144,13 +144,105 @@ RUN set -ex; \
&& apk del .build-deps \
&& kong version

{{ dockerfile_run_steps }}
```
{% endnavtab %}
{% endnavtabs %}
{% endcapture %}
{{ dockerfile | indent }}
{% endif_version %}

{% if_version gte:3.4.x %}
{% capture dockerfile_run_steps %}COPY docker-entrypoint.sh /docker-entrypoint.sh

USER kong

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 8000 8443 8001 8444 8002 8445 8003 8446 8004 8447

STOPSIGNAL SIGQUIT

HEALTHCHECK --interval=10s --timeout=10s --retries=10 CMD kong health

CMD ["kong", "docker-start"]{% endcapture %}

{% capture dockerfile %}
{% navtabs codeblock indent %}

{% navtab Debian %}
```dockerfile

FROM debian:bullseye-slim

COPY kong.deb /tmp/kong.deb

RUN set -ex; \
apt-get update \
&& apt-get install --yes /tmp/kong.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
&& ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
&& ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
&& kong version

{{ dockerfile_run_steps }}
```
{% endnavtab %}

{% navtab Ubuntu %}
```dockerfile

FROM ubuntu:20.04

COPY kong.deb /tmp/kong.deb

RUN set -ex; \
apt-get update \
&& apt-get install --yes /tmp/kong.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
&& ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
&& ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
&& kong version

{{ dockerfile_run_steps }}
```
{% endnavtab %}

{% navtab RHEL %}
```dockerfile

FROM registry.access.redhat.com/ubi8/ubi:8.1

COPY kong.rpm /tmp/kong.rpm

RUN set -ex; \
yum install -y /tmp/kong.rpm \
&& rm /tmp/kong.rpm \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
&& ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
&& ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
&& kong version

{{ dockerfile_run_steps }}
```
{% endnavtab %}
{% endnavtabs %}
{% endcapture %}
{{ dockerfile | indent }}
{% endif_version %}

1. Build your image:
```bash
Expand Down

0 comments on commit 215c185

Please sign in to comment.