-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (59 loc) · 2.13 KB
/
Dockerfile
File metadata and controls
75 lines (59 loc) · 2.13 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
# Code Container
# Generic Dockerfile for running coding tools in isolated project environments
FROM ubuntu:24.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Set timezone to America/New_York (EST)
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install system dependencies and common build tools
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
wget \
unzip \
ca-certificates \
libssl-dev \
zlib1g-dev \
libffi-dev \
vim \
tree
# Install NVM (Node Version Manager) and Node.js
ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=22
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install ${NODE_VERSION} \
&& nvm use ${NODE_VERSION} \
&& nvm alias default ${NODE_VERSION} \
&& ln -sf "$NVM_DIR/versions/node/$(nvm current)/bin/"* /usr/local/bin/
RUN apt-get update \
&& apt-get install -y \
python3 \
python3-dev \
python3-venv \
python3-pip
# Create python symlink pointing to python3
RUN ln -sf /usr/bin/python3 /usr/bin/python
# Install Claude Code globally via official installer
RUN curl -fsSL https://claude.ai/install.sh | bash
RUN echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
# Install Opencode
RUN npm install -g opencode-ai
# Install OpenAI Codex CLI
RUN npm install -g @openai/codex
# Install Gemini CLI
RUN npm install -g @google/gemini-cli
# Install GitHub Copilot CLI
RUN npm install -g @github/copilot
# Set working directory to root home
WORKDIR /root
# Configure bash prompt to show container name
RUN echo 'PS1="\[\033[01;32m\][code-container]\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$ "' >> /root/.bashrc
# Source NVM in bashrc for interactive shells
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> /root/.bashrc \
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> /root/.bashrc \
&& echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> /root/.bashrc
# Default command: bash shell
CMD ["/bin/bash"]