Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
125 lines (110 loc) · 3.57 KB
/
Copy pathDockerfile
File metadata and controls
125 lines (110 loc) · 3.57 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
FROM base AS node
USER root
ENV HOME=/root
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends curl libarchive-tools && \
rm -rf /var/lib/apt/lists/*
ARG NODE_VERSION
RUN mkdir -p /opt/node && \
curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
| bsdtar -xJ --strip-components=1 -C /opt/node && \
rm -f /opt/node/CHANGELOG.md /opt/node/LICENSE /opt/node/README.md
FROM base
USER root
ENV HOME=/root
ARG DEBIAN_FRONTEND=noninteractive
ARG PYTHON_VERSION=3.14
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
install -d -m 0755 /etc/apt/keyrings && \
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
-o /etc/apt/keyrings/githubcli-archive-keyring.gpg && \
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
bzip2 \
dnsutils \
file \
fzf \
gh \
git \
git-lfs \
gnupg \
iproute2 \
iputils-ping \
jq \
less \
libatomic1 \
lsof \
nano \
netcat-openbsd \
openssl \
procps \
python-is-python3 \
"python${PYTHON_VERSION}" \
"python${PYTHON_VERSION}-venv" \
python3-pip \
ripgrep \
rsync \
sqlite3 \
sudo \
tmux \
tree \
unzip \
vim \
wget \
xz-utils \
zip && \
rm -f /usr/lib/python3*/EXTERNALLY-MANAGED && \
rm -rf /var/lib/apt/lists/* && \
pip install uv && \
rm -rf /root/.cache/pip && \
git lfs install --system
COPY --from=node /opt/node /usr/local
RUN npm install -g pnpm@11 && \
npm cache clean --force
# Bun.
COPY --from=oven/bun:latest /usr/local/bin/bun /usr/local/bin/
RUN ln -s bun /usr/local/bin/bunx
# Coding agents.
RUN npm install -g \
opencode-ai \
@anthropic-ai/claude-code \
@openai/codex && \
npm install -g --ignore-scripts @earendil-works/pi-coding-agent && \
npm cache clean --force
RUN chown -R ubuntu:ubuntu /vercel
ENV HOME=/vercel
USER ubuntu
WORKDIR /vercel
RUN mkdir -p ~/.global/npm ~/.global/pnpm && \
npm config set prefix ~/.global/npm && \
pnpm config set global-dir ~/.global/pnpm && \
pnpm config set global-bin-dir ~/.global/pnpm/bin
ENV PATH="/vercel/.local/bin:/vercel/.global/pnpm/bin:/vercel/.global/npm/bin:${PATH}"
# fx (https://github.com/vercel-labs/fx). Installed into ~/.local/bin, like the
# upstream installer, so `fx upgrade` works without sudo.
ARG FX_VERSION
RUN mkdir -p ~/.local/bin && \
cd /tmp && \
curl -fsSLO "https://github.com/vercel-labs/fx/releases/download/v${FX_VERSION}/fx-linux-x86_64.tar.gz" && \
curl -fsSLO "https://github.com/vercel-labs/fx/releases/download/v${FX_VERSION}/fx-linux-x86_64.tar.gz.sha256" && \
sha256sum -c fx-linux-x86_64.tar.gz.sha256 && \
tar -xzf fx-linux-x86_64.tar.gz -C ~/.local/bin fx && \
rm fx-linux-x86_64.tar.gz fx-linux-x86_64.tar.gz.sha256
RUN node --version && \
bun --version && \
python --version | grep -F "Python ${PYTHON_VERSION}." && \
pip --version && \
uv --version && \
git --version && \
gh --version && \
sudo whoami && \
opencode --version && \
claude --version && \
codex --version && \
pi --version && \
fx --version