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

chore(ci): mount package directory at image build time #13350

Merged
merged 1 commit into from
Jul 10, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ jobs:
platforms: ${{ steps.docker_platforms_arg.outputs.platforms }}
build-args: |
KONG_BASE_IMAGE=${{ matrix.base-image }}
KONG_ARTIFACT_PATH=bazel-bin/pkg/
KONG_ARTIFACT_PATH=bazel-bin/pkg
KONG_VERSION=${{ needs.metadata.outputs.kong-version }}
RPM_PLATFORM=${{ steps.docker_rpm_platform_arg.outputs.rpm_platform }}
EE_PORTS=8002 8445 8003 8446 8004 8447
Expand Down
9 changes: 4 additions & 5 deletions build/dockerfiles/deb.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ ARG EE_PORTS
ARG TARGETARCH

ARG KONG_ARTIFACT=kong.${TARGETARCH}.deb
ARG KONG_ARTIFACT_PATH=
COPY ${KONG_ARTIFACT_PATH}${KONG_ARTIFACT} /tmp/kong.deb
ARG KONG_ARTIFACT_PATH

RUN apt-get update \
RUN --mount=type=bind,source=${KONG_ARTIFACT_PATH},target=/tmp/pkg \
apt-get update \
&& apt-get -y upgrade \
&& apt-get -y autoremove \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata \
&& apt-get install -y --no-install-recommends /tmp/kong.deb \
&& apt-get install -y --no-install-recommends /tmp/pkg/${KONG_ARTIFACT} \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 ${KONG_PREFIX} \
&& ln -sf /usr/local/openresty/bin/resty /usr/local/bin/resty \
Expand Down
9 changes: 4 additions & 5 deletions build/dockerfiles/rpm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ ARG EE_PORTS
ARG TARGETARCH

ARG KONG_ARTIFACT=kong.${RPM_PLATFORM}.${TARGETARCH}.rpm
ARG KONG_ARTIFACT_PATH=
COPY ${KONG_ARTIFACT_PATH}${KONG_ARTIFACT} /tmp/kong.rpm
ARG KONG_ARTIFACT_PATH

# hadolint ignore=DL3015
RUN yum update -y \
&& yum install -y /tmp/kong.rpm \
&& rm /tmp/kong.rpm \
RUN --mount=type=bind,source=${KONG_ARTIFACT_PATH},target=/tmp/pkg \
yum update -y \
&& yum install -y /tmp/pkg/${KONG_ARTIFACT} \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
&& ln -sf /usr/local/openresty/bin/resty /usr/local/bin/resty \
Expand Down
Loading