-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
85 lines (71 loc) · 3.95 KB
/
Dockerfile.alpine
File metadata and controls
85 lines (71 loc) · 3.95 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ==============================================================================
# ROCI GHOST MACHINE - ALPINE LINUX TEMPLATE
# ==============================================================================
FROM alpine:latest
# 1. Environment & UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
# 2. Base System & Build Tools
RUN apk update && apk add --no-cache \
bash curl gnupg git wget unzip ca-certificates \
build-base gdb make cmake \
python3 py3-pip \
htop btop net-tools glances sysstat inxi ncdu tree \
zip p7zip nmap lsof xclip \
nnn fzf ripgrep tmux \
bat eza zoxide fd jq \
kitty kitty-terminfo \
openssh-server \
&& mkdir -p /var/run/sshd \
&& ssh-keygen -A
# 3. Node.js (Latest Current)
RUN apk add --no-cache nodejs npm
# 4. Go Runtime
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then GO_ARCH="amd64"; elif [ "$ARCH" = "aarch64" ]; then GO_ARCH="arm64"; else GO_ARCH="amd64"; fi && \
curl -L "https://go.dev/dl/go1.24.2.linux-${GO_ARCH}.tar.gz" | tar -C /usr/local -xz
ENV PATH=$PATH:/usr/local/go/bin
# 5. Bun Runtime
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH=$PATH:/root/.bun/bin
# 6. Terminal IDEs (Micro, Helix, Lazygit, Fastfetch)
RUN apk add --no-cache micro \
&& ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then HELIX_ARCH="x86_64"; LAZY_ARCH="x86_64"; FF_ARCH="linux-amd64"; \
elif [ "$ARCH" = "aarch64" ]; then HELIX_ARCH="aarch64"; LAZY_ARCH="arm64"; FF_ARCH="linux-aarch64"; \
fi && \
curl -L "https://github.com/helix-editor/helix/releases/download/25.01.1/helix-25.01.1-${HELIX_ARCH}-linux.tar.xz" | tar xJ && \
mv helix-25.01.1-${HELIX_ARCH}-linux/hx /usr/local/bin/ && \
mkdir -p /root/.config/helix && mv helix-25.01.1-${HELIX_ARCH}-linux/runtime /root/.config/helix/ && \
rm -rf helix-25.01.1-${HELIX_ARCH}-linux && \
curl -L "https://github.com/jesseduffield/lazygit/releases/download/v0.61.1/lazygit_0.61.1_Linux_${LAZY_ARCH}.tar.gz" | tar xz lazygit && \
install lazygit /usr/local/bin && \
curl -L "https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-${FF_ARCH}.tar.gz" | tar xz && \
install fastfetch-*/usr/bin/fastfetch /usr/local/bin/fastfetch && rm -rf fastfetch-*
# 7. AI CLIs (Gemini, Codex, RTK)
RUN npm install -g @google/gemini-cli @openai/codex \
&& ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then RTK_ARCH="x86_64-unknown-linux-musl"; \
elif [ "$ARCH" = "aarch64" ]; then RTK_ARCH="aarch64-unknown-linux-gnu"; \
fi && \
curl -L "https://github.com/rtk-ai/rtk/releases/latest/download/rtk-${RTK_ARCH}.tar.gz" | tar xz && \
install rtk /usr/local/bin/rtk && rm rtk
# 8. UI/UX STACK (1. Oh-My-Bash, 2. Alias-Hub, 3. Neofetch-ASCII)
RUN bash -c "$(wget -qO- https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" --unattended \
&& bash -c "$(wget -qO- https://raw.githubusercontent.com/1999AZZAR/alias-hub/master/install.sh)" || true \
&& git clone https://github.com/1999AZZAR/neofetch_ascii.git /root/.local/share/neofetch_ascii
# 9. SSH Configuration
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& echo 'root:root' | chpasswd
# 10. MCP Servers
RUN mkdir -p /root/MCPservers \
&& git clone https://github.com/1999AZZAR/terminal-mcp-server.git /root/MCPservers/terminal \
&& cd /root/MCPservers/terminal && npm install && npm run build \
&& git clone https://github.com/1999AZZAR/filesystem-mcp-server.git /root/MCPservers/filesystem \
&& cd /root/MCPservers/filesystem && npm install && npm run build \
&& npm install -g @modelcontextprotocol/server-sequential-thinking \
&& echo '#!/bin/bash\nnode /root/MCPservers/terminal/build/index.js "$@"' > /usr/local/bin/mcp-terminal \
&& echo '#!/bin/bash\nnode /root/MCPservers/filesystem/dist/index.js "$@"' > /usr/local/bin/mcp-filesystem \
&& chmod +x /usr/local/bin/mcp-terminal /usr/local/bin/mcp-filesystem
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]