Created
July 31, 2023 01:15
-
-
Save jei0486/77134f55e9e78b516b3be6c74b98d1a5 to your computer and use it in GitHub Desktop.
Dockerfile_ttyd
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 ubuntu:20.04 | |
LABEL description="ubuntu:20.04 + ttyd + kubectl" | |
## https://github.com/tsl0922/ttyd | |
# 1) install apt package | |
RUN apt-get update -y && apt-get install tini bash tzdata sudo nano curl lrzsz -y | |
# 2) install ttyd (version > 1.7.3) | |
RUN curl -LO "https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.arm" \ | |
&& mv ttyd.arm /usr/local/bin/ttyd.arm && chmod 755 /usr/local/bin/ttyd.arm | |
# 3) install kubectl | |
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ | |
&& mv kubectl /usr/bin && chmod 755 /usr/bin/kubectl \ | |
&& mkdir /root/.kube | |
EXPOSE 7681 | |
ENTRYPOINT ["/usr/bin/tini", "--"] | |
CMD ["/usr/local/bin/ttyd.arm", "-t enableZmodem=true" , "bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment