-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,29 @@ | ||
FROM docker.io/library/debian:bookworm AS build_istiod | ||
ARG TOOLCHAIN_REVISION=undefined | ||
FROM artificialwisdomai/toolchain:${TOOLCHAIN_REVISION} AS istiod | ||
|
||
ENV DEBIAN_FRONTEND="noninteractive" | ||
ENV ISTIOD_VERSION="1.22.3" | ||
ENV PATH="$PATH:/usr/local/go/bin" | ||
ENV TARGET_ARCH="amd64" | ||
ENV DEB_COMPRESSION="--deb-compression=none" | ||
# postinst.sh may not be needed. | ||
ENV SIDECAR_FILES="pilot-discovery istioctl envoy pilot-agent envoy_bootstrap.json istio-start.sh istio.service sidecar.env postinst.sh" | ||
ENV BUILD_WITH_CONTAINER="0" | ||
ENV GO_VERSION="1.22.5" | ||
|
||
|
||
RUN apt update | ||
RUN apt --yes install build-essential | ||
RUN apt --yes install curl | ||
RUN apt --yes install ruby3.1 | ||
RUN apt --yes install git | ||
### | ||
# | ||
# Install fpm which is required by Istio's makefiles | ||
|
||
RUN apt --yes install ruby3.1 | ||
RUN gem3.1 install fpm | ||
|
||
RUN mkdir -p /workspace/source | ||
RUN mkdir -p /workspace/build | ||
RUN mkdir -p /workspace/target | ||
|
||
WORKDIR /workspace/fetch | ||
RUN curl --location https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz --remote-name | ||
RUN tar -xf go${GO_VERSION}.linux-amd64.tar.gz | ||
RUN mv go /usr/local | ||
|
||
### | ||
# | ||
# Prepare and build cloud-hypervisor | ||
# Prepare and build istiod | ||
|
||
WORKDIR /workspace/source | ||
RUN git clone --depth 1 --branch ${ISTIOD_VERSION} https://github.com/istio/istio istiod-${ISTIOD_VERSION} | ||
WORKDIR /workspace | ||
RUN git clone --depth 1 --branch ${ISTIOD_VERSION} https://github.com/istio/istio build | ||
|
||
WORKDIR /workspace/source/istiod-${ISTIOD_VERSION} | ||
WORKDIR /workspace/build | ||
RUN make build-linux | ||
RUN make deb | ||
|
||
RUN cp --archive --recursive /workspace/source/istiod-${ISTIOD_VERSION}/out/linux_amd64/* /workspace/target | ||
RUN cp --archive --recursive /workspace/build/out/linux_amd64/release/*.deb /workspace/target | ||
|
||
FROM scratch | ||
COPY --from=build_istiod /workspace/target / | ||
COPY --from=istiod /workspace/target / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
ISTIOD_VERSION=v1.22.5 | ||
TOOLCHAIN_REVISION=20240813 | ||
date=$(date '+%Y%m%d%H%M%S') | ||
|
||
docker buildx build --tag artificialwisdomai/istiod:${ISTIOD_VERSION}-${date} --output type=docker --progress plain . | ||
docker buildx build --tag artificialwisdomai/istiod:${ISTIOD_VERSION}-${date} --output type=local,dest="${PWD}/target" --progress plain . | ||
docker buildx build --tag artificialwisdomai/istiod:${ISTIOD_VERSION} --output type=docker --progress plain . | ||
docker buildx build --build-arg TOOLCHAIN_REVISION=${TOOLCHAIN_REVISION} --tag artificialwisdomai/istiod:${ISTIOD_VERSION}-${date} --output type=docker --progress plain . | ||
docker buildx build --build-arg TOOLCHAIN_REVISION=${TOOLCHAIN_REVISION} --tag artificialwisdomai/istiod:${ISTIOD_VERSION}-${date} --output type=local,dest="${PWD}/target" --progress plain . | ||
docker buildx build --build-arg TOOLCHAIN_REVISION=${TOOLCHAIN_REVISION} --tag artificialwisdomai/istiod:${ISTIOD_VERSION} --output type=docker --progress plain . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters