Skip to main content
Glama
Dockerfile3.33 kB
# Development Container with GitHub CLI and Git support FROM node:20 ARG TZ ENV TZ="${TZ:-America/Los_Angeles}" # Install essential development tools including GitHub CLI RUN apt-get update && apt-get install -y --no-install-recommends \ less \ git \ procps \ sudo \ fzf \ zsh \ man-db \ unzip \ gnupg2 \ curl \ wget \ jq \ nano \ vim \ locales \ tree \ htop \ file \ build-essential \ python3 \ python3-pip \ python3-venv \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install GitHub CLI RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && apt-get update \ && apt-get install gh -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install Claude Code CLI RUN npm install -g @anthropic-ai/claude-code # Set up proper locale RUN locale-gen en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LC_ALL=en_US.UTF-8 # Ensure default node user has access to /usr/local/share RUN mkdir -p /usr/local/share/npm-global && \ chown -R node:node /usr/local/share ARG USERNAME=node # Persist bash history RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ && mkdir /commandhistory \ && touch /commandhistory/.bash_history \ && chown -R $USERNAME /commandhistory # Set `DEVCONTAINER` environment variable to help with orientation ENV DEVCONTAINER=true # Create workspace directory and claude config directory, set permissions RUN mkdir -p /workspace && \ mkdir -p /home/node/.claude && \ chown -R node:node /workspace && \ chown -R node:node /home/node/.claude WORKDIR /workspace # Install git-delta for better diffs ARG GIT_DELTA_VERSION=0.18.2 RUN ARCH=$(dpkg --print-architecture) && \ wget "https://github.com/dandavison/delta/releases/download/${GIT_DELTA_VERSION}/git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ sudo dpkg -i "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ rm "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" # Set up non-root user USER node # Install global packages ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global ENV PATH=$PATH:/usr/local/share/npm-global/bin # Set the default shell to zsh rather than sh ENV SHELL=/bin/zsh # Set the default editor and visual ENV EDITOR=nano ENV VISUAL=nano # Install oh-my-zsh with useful plugins ARG ZSH_IN_DOCKER_VERSION=1.2.0 RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v${ZSH_IN_DOCKER_VERSION}/zsh-in-docker.sh)" -- \ -p git \ -p fzf \ -p npm \ -p node \ -p docker \ -p docker-compose \ -p github \ -p gitignore \ -a "source /usr/share/doc/fzf/examples/key-bindings.zsh" \ -a "source /usr/share/doc/fzf/examples/completion.zsh" \ -a "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ -x # Create a setup script for GitHub authentication USER root COPY setup-github.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/setup-github.sh USER node # Default command CMD ["/bin/zsh"]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swapnilsurdi/mcp-pa'

If you have feedback or need assistance with the MCP directory API, please join our Discord server