Created
October 1, 2024 12:35
-
-
Save SIMULATAN/79f740de8a6da9e6a3170c98c39850d5 to your computer and use it in GitHub Desktop.
Leocloud Docker (Safe)
This file contains hidden or 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
FROM debian:testing-slim | |
RUN apt update && apt install -y firefox-esr curl | |
ARG user=hackmenot | |
ARG group=hackmenot | |
ARG uid=1001 | |
ARG gid=1001 | |
RUN groupadd -g ${gid} ${group} | |
RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} | |
USER ${uid}:${gid} | |
WORKDIR /cloud | |
COPY --chmod=777 <<-"EOF" /entrypoint.sh | |
#!/usr/bin/env bash | |
echo "Downloading..." | |
curl -fsSLO https://admission.cloud.htl-leonding.ac.at/html/leocloud-cli.tgz | |
echo "Downloading done, extracting..." | |
tar -xzf leocloud-cli.tgz | |
echo "Extracting done, setting up environment..." | |
export DISPLAY=":0" | |
export BROWSER=firefox | |
chmod +x ./leocloud/linux/leocloud | |
echo "Executing on $DISPLAY..." | |
./leocloud/linux/leocloud auth login | |
echo "Generated Kubeconfig:" | |
cat ~/.kube/config | |
EOF | |
ENTRYPOINT [ "/entrypoint.sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions: