Skip to content

Commit

Permalink
install binaries according to architecture
Browse files Browse the repository at this point in the history
Signed-off-by: Jones Jefferson <jones@accuknox.com>
  • Loading branch information
Jones Jefferson committed Aug 4, 2024
1 parent 6a241b3 commit fcac1e1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
FROM ubuntu:22.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openssl ca-certificates curl netcat jq
RUN curl -LO https://dl.k8s.io/release/v1.27.2/bin/linux/amd64/kubectl --output-dir /usr/local/bin/ && chmod +x /usr/local/bin/kubectl

# Determine architecture and download the appropriate binaries
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
curl -LO https://dl.k8s.io/release/v1.27.2/bin/linux/amd64/kubectl --output-dir /usr/local/bin/ && \
curl -L https://github.com/RUB-NDS/Terrapin-Scanner/releases/download/v1.1.0/Terrapin_Scanner_Linux_amd64 -o /usr/local/bin/Terrapin_Scanner; \
elif [ "$ARCH" = "aarch64" ]; then \
curl -LO https://dl.k8s.io/release/v1.27.2/bin/linux/arm64/kubectl --output-dir /usr/local/bin/ && \
curl -L https://github.com/RUB-NDS/Terrapin-Scanner/releases/download/v1.1.3/Terrapin_Scanner_Linux_aarch64 -o /usr/local/bin/Terrapin_Scanner; \
else \
echo "Unsupported architecture: $ARCH"; exit 1; \
fi && \
chmod +x /usr/local/bin/kubectl /usr/local/bin/Terrapin_Scanner

RUN curl -sfL https://raw.githubusercontent.com/kubearmor/tabled/main/install.sh | sh -s -- -b /usr/local/bin v0.1.2
RUN curl -L https://github.com/RUB-NDS/Terrapin-Scanner/releases/download/v1.1.0/Terrapin_Scanner_Linux_amd64 -o /usr/local/bin/Terrapin_Scanner && chmod +x /usr/local/bin/Terrapin_Scanner

COPY src /home/k8tls
COPY config /home/k8tls
Expand Down

0 comments on commit fcac1e1

Please sign in to comment.