Skip to content

Commit

Permalink
re-add ttyd
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Oct 10, 2024
1 parent c277f9b commit 8cefd08
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docker/extra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8cefd08

Please sign in to comment.