mirror of
https://github.com/sailor-sh/CK-X.git
synced 2026-05-24 01:12:49 +00:00
FIX: startup issue
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
FROM earthly/dind
|
||||
|
||||
RUN wget https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
|
||||
RUN chmod +x kind-linux-amd64
|
||||
RUN mv kind-linux-amd64 /usr/local/bin/kind
|
||||
# Accept build-time architecture argument
|
||||
ARG TARGETARCH
|
||||
|
||||
# install kind for x86_64 architecture
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
wget https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64 && \
|
||||
chmod +x kind-linux-amd64 && \
|
||||
mv kind-linux-amd64 /usr/local/bin/kind && \
|
||||
echo "Building for x86_64 platform"; \
|
||||
touch /amd64-ready; \
|
||||
fi
|
||||
|
||||
# install kind for ARM64 architecture
|
||||
RUN if [ "$TARGETARCH" = "arm64" ]; then \
|
||||
wget https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-arm64 && \
|
||||
chmod +x kind-linux-arm64 && \
|
||||
mv kind-linux-arm64 /usr/local/bin/kind && \
|
||||
echo "Building for ARM64 platform"; \
|
||||
touch /arm64-ready; \
|
||||
fi
|
||||
|
||||
# use our own to start kind cluster
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
@@ -15,6 +15,13 @@ if [ -f "kind-config.yaml" ]; then
|
||||
rm -f kind-config.yaml
|
||||
fi
|
||||
|
||||
# Wait until kindest/node:$KIND_DEFAULT_VERSION is present
|
||||
while ! docker images kindest/node | grep -q kindest/node; do
|
||||
echo "Waiting for kindest/node to be available..."
|
||||
sleep 5
|
||||
done
|
||||
echo "kindest/node is now available"
|
||||
|
||||
cat <<EOF > /tmp/kind-config.yaml
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
|
||||
Reference in New Issue
Block a user