ordlibrary commited on
Commit
f2d29af
·
verified ·
1 Parent(s): c9a19e2

Fix: install ttyd from static binary (not in Debian repos)

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -1
Dockerfile CHANGED
@@ -10,10 +10,22 @@ ENV DEBIAN_FRONTEND=noninteractive \
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  ca-certificates curl wget git jq ripgrep nano vim less \
12
  build-essential python3 python3-pip python3-venv \
13
- nginx supervisor ttyd locales tini \
14
  && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
18
 
19
  # Node.js 20 (NodeSource)
 
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  ca-certificates curl wget git jq ripgrep nano vim less \
12
  build-essential python3 python3-pip python3-venv \
13
+ nginx supervisor locales tini \
14
  && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # ttyd static binary (not in Debian repos) — pick arch at build time
18
+ RUN set -eux; \
19
+ arch="$(dpkg --print-architecture)"; \
20
+ case "$arch" in \
21
+ amd64) ttyd_arch="x86_64" ;; \
22
+ arm64) ttyd_arch="aarch64" ;; \
23
+ *) echo "unsupported arch: $arch"; exit 1 ;; \
24
+ esac; \
25
+ curl -fsSL "https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.${ttyd_arch}" -o /usr/local/bin/ttyd; \
26
+ chmod +x /usr/local/bin/ttyd; \
27
+ ttyd --version
28
+
29
  ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
30
 
31
  # Node.js 20 (NodeSource)