-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (55 loc) · 1.91 KB
/
Dockerfile
File metadata and controls
64 lines (55 loc) · 1.91 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
# Development container for Sourcebot
# Based on Node.js 24 with TypeScript support
FROM mcr.microsoft.com/devcontainers/typescript-node:24
ARG GO_VERSION=1.23.4
ARG CTAGS_VERSION=v6.1.0
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
# Build tools for universal-ctags
autoconf \
automake \
pkg-config \
make \
gcc \
g++ \
libjansson-dev \
libyaml-dev \
libseccomp-dev \
libxml2-dev \
# PostgreSQL client tools (for debugging)
postgresql-client \
# Redis CLI tools (for debugging)
redis-tools \
# Other utilities
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Go (detect architecture automatically)
RUN ARCH=$(dpkg --print-architecture) && \
if [ "$ARCH" = "arm64" ]; then GOARCH="arm64"; else GOARCH="amd64"; fi && \
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${GOARCH}.tar.gz" | tar -C /usr/local -xzf -
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/home/node/go"
ENV PATH="${GOPATH}/bin:${PATH}"
# Build and install universal-ctags from source
RUN git clone --depth 1 --branch "${CTAGS_VERSION}" https://github.com/universal-ctags/ctags.git /tmp/ctags \
&& cd /tmp/ctags \
&& ./autogen.sh \
&& ./configure \
&& make -j$(nproc) \
&& make install \
&& rm -rf /tmp/ctags
# Enable corepack for Yarn and disable download prompts
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
RUN corepack enable
# Create directories that will be mounted as volumes with correct ownership
# This ensures the node user can write to them when volumes are mounted
RUN mkdir -p /home/node/go /home/node/.yarn/berry/cache \
&& chown -R node:node /home/node/go /home/node/.yarn
# Set working directory
WORKDIR /workspaces/sourcebot
# Switch to non-root user
USER node
# Install Claude CLI (native binary)
RUN curl -fsSL https://claude.ai/install.sh | bash
ENV PATH="/home/node/.claude/bin:${PATH}"