-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile.dev
More file actions
37 lines (31 loc) · 1.18 KB
/
Dockerfile.dev
File metadata and controls
37 lines (31 loc) · 1.18 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
ARG AGENT=codex
FROM agent-sandbox-${AGENT}:local
USER root
# Setup go
RUN /etc/agent-sandbox/stacks/go.sh 1.26.1
ENV GOPATH=/home/dev/go
ENV GOBIN=/home/dev/go/bin
ENV GOMODCACHE=/home/dev/.cache/go-mod
ENV GOCACHE=/home/dev/.cache/go-build
# Setup python
RUN /etc/agent-sandbox/stacks/python.sh
RUN python3 -m venv /opt/proxy-python && \
/opt/proxy-python/bin/pip install --no-cache-dir mitmproxy pytest PyYAML
ENV PIP_CACHE_DIR=/home/dev/.cache/pip
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
# Login shells reset PATH through /etc/profile, so persist the dev-image tool
# ordering in the shell startup locations used by the base image.
RUN printf '%s\n' \
'. /etc/agent-sandbox/path-helpers.sh' \
'' \
'path_append "$HOME/go/bin"' \
'path_prepend "/usr/local/go/bin"' \
'path_prepend "/opt/proxy-python/bin"' \
'path_prepend "$HOME/.local/bin"' \
'path_dedupe' \
'export PATH' \
> /etc/profile.d/zz-agentbox-dev-path.sh && \
cp /etc/profile.d/zz-agentbox-dev-path.sh /etc/zsh/zshenv.d/zz-agentbox-dev-path.zsh
# Keep agent binaries ahead of the proxy test env and Go-installed tools.
ENV PATH=/home/dev/.local/bin:/opt/proxy-python/bin:/usr/local/go/bin:$PATH:/home/dev/go/bin
USER dev