-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build
40 lines (30 loc) · 1.16 KB
/
Dockerfile.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ARG OSTYPE=linux-gnu
ARG ARCHITECTURE=x86_64
ARG DOCKER_REGISTRY=ghcr.io
ARG DOCKER_IMAGE_NAME
ARG OPERATING_SYSTEM=ubuntu
ARG OPERATING_SYSTEM_VERSION="22.04"
# List out all image permutations to trick dependabot
FROM --platform=linux/amd64 ghcr.io/hutchic-org/kong-runtime:1.0.8-x86_64-linux-musl as x86_64-linux-musl
FROM --platform=linux/amd64 ghcr.io/hutchic-org/kong-runtime:1.0.8-x86_64-linux-gnu as x86_64-linux-gnu
FROM --platform=linux/arm64 ghcr.io/hutchic-org/kong-runtime:1.0.8-aarch64-linux-musl as aarch64-linux-musl
FROM --platform=linux/arm64 ghcr.io/hutchic-org/kong-runtime:1.0.8-aarch64-linux-gnu as aarch64-linux-gnu
# Run the build script
FROM $ARCHITECTURE-$OSTYPE as building
COPY . /tmp
WORKDIR /tmp
COPY kong /kong
# Run our predecessor tests
# Configure, build, and install
# Run our own tests
# Re-run our predecessor tests
ENV DEBUG=0
RUN /test/*/test.sh && \
/tmp/build.sh && \
/tmp/test.sh && \
/test/*/test.sh
# Test scripts left where downstream images can run them
COPY test.sh /test/kong-development/test.sh
# Copy the build result to scratch so we can export the result
FROM scratch as build
COPY --from=building /tmp/build /