@@ -2,6 +2,18 @@ FROM public.ecr.aws/docker/library/golang:1.22.3-bookworm AS build-base
22
33RUN apt-get update && apt-get install -y jq postgresql-client && apt-get clean && rm -rf /var/lib/apt/lists/*
44
5+ RUN groupadd -g 1000 coder
6+ RUN useradd -u 1000 -g coder coder
7+ RUN usermod -aG sudo coder
8+ RUN echo 'coder ALL=NOPASSWD: ALL' >> /etc/sudoers
9+
10+ USER coder
11+ WORKDIR /home/coder
12+
13+ RUN git config --global --add safe.directory /workspaces
14+ RUN git config --global user.email
"[email protected] " 15+ RUN git config --global user.name "SuperCoder"
16+
517WORKDIR $GOPATH/src/packages/ai-developer/
618
719COPY go.mod .
@@ -51,6 +63,9 @@ ENTRYPOINT ["go", "run", "worker.go"]
5163
5264FROM superagidev/supercoder-python-ide:latest AS python-executor
5365
66+ WORKDIR /home/coder
67+
68+ RUN git config --global --add safe.directory /workspaces
5469RUN git config --global user.email
"[email protected] " 5570RUN git config --global user.name "SuperCoder"
5671
@@ -65,6 +80,11 @@ ENTRYPOINT ["bash", "-c", "/entrypoint.d/initialise.sh && /go/executor"]
6580
6681FROM superagidev/supercoder-node-ide:latest AS node-executor
6782
83+ USER coder
84+
85+ WORKDIR /home/coder
86+
87+ RUN git config --global --add safe.directory /workspaces
6888RUN git config --global user.email
"[email protected] " 6989RUN git config --global user.name "SuperCoder"
7090
@@ -83,6 +103,11 @@ RUN apt-get update && \
83103 apt-get install -y git zip \
84104 && apt-get clean
85105
106+ RUN useradd -m coder
107+
108+ USER coder
109+
110+ RUN git config --global --add safe.directory /workspaces
86111RUN git config --global user.email
"[email protected] " 87112RUN git config --global user.name "SuperCoder"
88113
0 commit comments