@@ -96,9 +96,78 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
9696 && mv -f /tmp/scripts/first-run-notice.txt /usr/local/etc/vscode-dev-containers/ \
9797 && rm -rf /tmp/scripts
9898
99+ # Install Go
100+ RUN ARCH=$(dpkg --print-architecture) \
101+ && curl -fsSL "https://golang.org/dl/go1.24.1.linux-${ARCH}.tar.gz" | tar -C /usr/local -xzf -
102+
103+ # Install Node.js
104+ RUN ARCH=$(dpkg --print-architecture) \
105+ && case $ARCH in \
106+ amd64) NODE_ARCH="x64" ;; \
107+ arm64) NODE_ARCH="arm64" ;; \
108+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
109+ esac \
110+ && curl -fsSL "https://nodejs.org/dist/v22.11.0/node-v22.11.0-linux-${NODE_ARCH}.tar.xz" | tar -C /usr/local --strip-components=1 -xJ \
111+ && npm install -g yarn
112+
113+ # Install kubectl, helm, and minikube
114+ RUN ARCH=$(dpkg --print-architecture) \
115+ && case $ARCH in \
116+ amd64) K8S_ARCH="amd64" ;; \
117+ arm64) K8S_ARCH="arm64" ;; \
118+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
119+ esac \
120+ # Install kubectl
121+ && curl -fsSL "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${K8S_ARCH}/kubectl" -o /usr/local/bin/kubectl \
122+ && chmod +x /usr/local/bin/kubectl \
123+ # Install helm
124+ && curl -fsSL "https://get.helm.sh/helm-v3.16.4-linux-${K8S_ARCH}.tar.gz" | tar -C /tmp -xzf - \
125+ && mv "/tmp/linux-${K8S_ARCH}/helm" /usr/local/bin/helm \
126+ && rm -rf "/tmp/linux-${K8S_ARCH}" \
127+ # Install minikube
128+ && curl -fsSL "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-${K8S_ARCH}" -o /usr/local/bin/minikube \
129+ && chmod +x /usr/local/bin/minikube
130+
131+ # Set up Go environment
132+ ENV PATH="/usr/local/go/bin:$PATH"
133+ ENV GOPATH="/go"
134+ ENV CGO_ENABLED=1
135+
136+ # Create go workspace
137+ RUN mkdir -p /go/bin /go/src /go/pkg
138+
139+ # Create codespace user (matching what devcontainer features would create)
140+ RUN groupadd --gid 1000 codespace \
141+ && useradd --uid 1000 --gid 1000 -m codespace \
142+ && echo "codespace ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/codespace \
143+ && chmod 0440 /etc/sudoers.d/codespace
144+
145+ # Install additional development tools
146+ RUN ARCH=$(dpkg --print-architecture) \
147+ # Install GitHub CLI
148+ && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
149+ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
150+ && echo "deb [arch=${ARCH} 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 \
151+ && apt-get update \
152+ && apt-get install -y gh git-lfs \
153+ # Install protoc
154+ && case $ARCH in \
155+ amd64) PROTOC_ARCH="x86_64" ;; \
156+ arm64) PROTOC_ARCH="aarch_64" ;; \
157+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
158+ esac \
159+ && curl -fsSL "https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-${PROTOC_ARCH}.zip" -o /tmp/protoc.zip \
160+ && unzip /tmp/protoc.zip -d /usr/local \
161+ && rm /tmp/protoc.zip \
162+ && apt-get clean \
163+ && rm -rf /var/lib/apt/lists/*
164+
99165# Install Atlas for MySQL migration
100166RUN curl -sSf https://atlasgo.sh | sh -s -- -y
101167
168+ # Switch to codespace user
169+ USER codespace
170+
102171# Mount for docker-in-docker
103172VOLUME [ "/var/lib/docker" ]
104173
0 commit comments