From 8cefd08fc14053a9729a4f91c54ce5a7b2c48c54 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Wed, 9 Oct 2024 17:57:03 -0700 Subject: [PATCH] re-add ttyd --- docker/extra/Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docker/extra/Dockerfile b/docker/extra/Dockerfile index 4b54e41..775dd12 100644 --- a/docker/extra/Dockerfile +++ b/docker/extra/Dockerfile @@ -236,3 +236,29 @@ RUN set -ex \ && ${TEST} \ && ${dir_clean} \ && echo + +################################################################################## +# Install ttyd +# - https://tsl0922.github.io/ttyd +# - https://github.com/tsl0922/ttyd +RUN echo \ +&& export NAME=ttyd \ +&& export TEST="${NAME} --version" \ +&& export REPOSITORY="tsl0922/ttyd" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ +&& export PKG="${NAME}.${ARCH}" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo