forked from decoge/kali-linux-webterminal-railway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 1 KB
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM kalilinux/kali-rolling
# Railway will override PORT; keep a local default
ENV PORT=7681
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates wget curl git python3 python3-pip tini fastfetch
# Ensure the target dir exists
RUN mkdir -p /usr/local/bin
# Install latest ttyd (pick correct binary for the CPU)
RUN set -eux; \
arch="$(uname -m)"; \
case "$arch" in \
x86_64|amd64) ttyd_asset="ttyd.x86_64" ;; \
aarch64|arm64) ttyd_asset="ttyd.aarch64" ;; \
*) echo "Unsupported arch: $arch" >&2; exit 1 ;; \
esac; \
wget -qO /usr/local/bin/ttyd "https://github.com/tsl0922/ttyd/releases/latest/download/${ttyd_asset}" \
&& chmod +x /usr/local/bin/ttyd
# Show system info on shell start (fastfetch)
RUN echo "fastfetch || true" >> /root/.bashrc
EXPOSE 7681
ENTRYPOINT ["/usr/bin/tini","--"]
CMD ["/bin/bash","-lc", "/usr/local/bin/ttyd --writable -i 0.0.0.0 -p ${PORT} -c ${USERNAME}:${PASSWORD} /bin/bash"]