@@ -86,37 +86,16 @@ ENV DEBIAN_FRONTEND=dialog
8686# Default command
8787CMD ["/bin/bash" ]
8888
89- # Stage 2: Development container with all tools including Docker and Kind
89+ # Stage 2: Development container with Kind and debugging tools
9090FROM ci AS dev
9191
9292USER root
9393
94- # Switch to noninteractive for Docker installation
94+ # Switch to noninteractive for package installation
9595ENV DEBIAN_FRONTEND=noninteractive
9696
97- # Install Docker (for local development and Kind cluster management)
98- RUN apt-get update \
99- && apt-get -y install --no-install-recommends \
100- apt-transport-https \
101- gnupg \
102- lsb-release \
103- && install -m 0755 -d /etc/apt/keyrings \
104- && curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
105- && chmod a+r /etc/apt/keyrings/docker.asc \
106- && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
107- && apt-get update \
108- && apt-get -y install --no-install-recommends \
109- docker-ce \
110- docker-ce-cli \
111- containerd.io \
112- docker-buildx-plugin \
113- docker-compose-plugin \
114- bash-completion \
115- && apt-get autoremove -y \
116- && apt-get clean -y \
117- && rm -rf /var/lib/apt/lists/*
118-
11997# Install Kind (for local Kubernetes clusters)
98+ # Docker is provided by devcontainer.json docker-in-docker feature
12099ENV KIND_VERSION=v0.30.0
121100RUN curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64 \
122101 && chmod +x /usr/local/bin/kind
@@ -127,34 +106,21 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest
127106# Install VSCode Go extension tools (gopls and staticcheck)
128107RUN go install golang.org/x/tools/gopls@latest \
129108 && go install honnef.co/go/tools/cmd/staticcheck@latest
130-
131- # Verify Docker and Kind installations
109+ # Verify Kind and Delve installations
132110RUN echo "=== Additional Dev Tools ===" \
133111 && kind version \
134- && docker --version \
135112 && dlv version \
136- && gopls version \
137- && staticcheck -version
113+ && echo "✅ Docker will be available at runtime via devcontainer feature"
138114
139115# Create vscode user for non-root development
140116RUN groupadd --gid 1000 vscode \
141117 && useradd --uid 1000 --gid vscode --shell /bin/bash --create-home vscode \
142118 && echo 'vscode ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/vscode \
143119 && chmod 0440 /etc/sudoers.d/vscode
144120
145- # Configure bash completion for vscode user
146- RUN echo ". /usr/share/bash-completion/bash_completion" >> /home/vscode/.bashrc
147-
148- # Add vscode user to docker group for non-root Docker access
149- RUN usermod -aG docker vscode
150-
151121# Ensure vscode user owns Go directories and has proper permissions
152122RUN mkdir -p /go && chown -R vscode:vscode /go
153123
154- # Fix Docker socket permissions for non-root access (will be applied at runtime)
155- # Note: This is set in devcontainer.json postCreateCommand as well
156- RUN chmod 666 /var/run/docker.sock || true
157-
158124# Switch back to vscode user for development
159125USER vscode
160126
0 commit comments