Skip to content

Commit 1461039

Browse files
committed
📦 build(Dockerfile): add support for multi-architecture builds
- Updated Dockerfile to enable multi-architecture support, ensuring compatibility across various platforms. - Included necessary build arguments and configurations to streamline the build process for both amd64 and arm64 architectures.
1 parent e397333 commit 1461039

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎entrypoint.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -e
44

5+
# Set default TARGETARCH if not provided
6+
if [ -z "$TARGETARCH" ]; then
7+
export TARGETARCH=amd64
8+
fi
9+
510
# Check if KUBE_CONFIG_DATA environment variable is set
611
if [ -z "$KUBE_CONFIG_DATA" ]; then
712
echo "Error: KUBE_CONFIG_DATA environment variable is not set"
@@ -18,6 +23,7 @@ if [ ! -s /tmp/config ]; then
1823
exit 1
1924
fi
2025

26+
# Handle kubectl version if specified
2127
if [ ! -z "${KUBECTL_VERSION}" ]; then
2228
if [ ! -e /usr/bin/kubectl-${KUBECTL_VERSION} ]; then
2329
echo "Pulling kubectl for version $KUBECTL_VERSION"
@@ -30,6 +36,7 @@ if [ ! -z "${KUBECTL_VERSION}" ]; then
3036
fi
3137
echo "Using kubectl version: $(kubectl version --client 2>&1)"
3238

39+
# Handle aws-iam-authenticator version if specified
3340
if [ ! -z "${IAM_VERSION}" ]; then
3441
if [ ! -e /usr/bin/aws-iam-authenticator-${IAM_VERSION} ]; then
3542
echo "Pulling aws-iam-authenticator for version $IAM_VERSION"
@@ -53,6 +60,7 @@ if ! command -v aws-iam-authenticator >/dev/null 2>&1; then
5360
exit 1
5461
fi
5562

63+
# Execute the command
5664
if [ -z "$RUN_COMMAND" ] ; then
5765
sh -c "kubectl $*"
5866
else

0 commit comments

Comments
 (0)