FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
build-essential \
ca-certificates \
openssh-client \
sudo \
vim \
jq \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g @anthropic-ai/claude-code
RUN useradd -m -s /bin/bash dev \
&& echo "dev ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Pre-populate known_hosts with common git hosting SSH keys
RUN mkdir -p /home/dev/.ssh && chmod 700 /home/dev/.ssh \
&& ssh-keyscan -t rsa,ecdsa,ed25519 \
github.com \
gitlab.com \
ssh.dev.azure.com \
vs-ssh.visualstudio.com \
bitbucket.org \
> /home/dev/.ssh/known_hosts 2>/dev/null \
&& chmod 644 /home/dev/.ssh/known_hosts \
&& chown -R dev:dev /home/dev/.ssh
RUN mkdir -p /workspace && chown -R dev:dev /workspace
USER dev
WORKDIR /workspace