-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
108 lines (93 loc) · 3.41 KB
/
Dockerfile
File metadata and controls
108 lines (93 loc) · 3.41 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# --------------------------------------------------
# Autonomous Dev Environment Dockerfile
# Base image: Ubuntu 22.04
# --------------------------------------------------
FROM ubuntu:22.04
LABEL maintainer="autonomousworld"
LABEL name="autonomousworld-vscode"
LABEL org.opencontainers.image.title="autonomousworld-vscode" \
org.opencontainers.image.description="Autonomous dev env (code-server + MCPs) ready to use" \
org.opencontainers.image.source="https://github.com/netzulo/autonomousworld-vscode" \
org.opencontainers.image.url="https://github.com/netzulo/autonomousworld-vscode" \
org.opencontainers.image.licenses="MIT"
SHELL ["/bin/bash", "-c"]
# --------------------------------------------
# ENV Defaults (override with Docker Compose or CLI)
# --------------------------------------------
ENV LANGUAGES=node,python,java \
NODE_VERSION=20.11.1 \
ASDF_VERSION=v0.14.0 \
PYTHON_VERSION=3.12.1 \
JAVA_VERSION=temurin-17.0.10+7 \
VSCODE_DIR=/opt/vscode \
VSCODE_PORT=8443 \
VSCODE_PASSWORD=agent \
OPENAI_API_KEY=your_openai_api_key_here \
OPENAI_MODEL=gpt-4 \
GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token_here
# --------------------------------------------
# Locale setup
# --------------------------------------------
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y locales && \
locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# --------------------------------------------
# Base system setup
# --------------------------------------------
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
unzip \
zip \
gnupg \
ca-certificates \
sudo \
software-properties-common \
python3-pip \
python3-venv \
bash-completion \
$CUSTOM_PACKAGES && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# --------------------------------------------
# Terminal Editors (optional)
# --------------------------------------------
RUN echo "Installing terminal editors..." && \
apt-get update && apt-get install -y micro vim nano
# --------------------------------------------
# Copy scripts
# --------------------------------------------
COPY src/scripts /opt/scripts/
RUN chmod +x /opt/scripts/*.sh || true
# --------------------------------------------
# Install languages
# --------------------------------------------
RUN for lang in $(echo $LANGUAGES | tr "," "\n"); do \
bash /opt/scripts/install_${lang}.sh || echo "No script for $lang"; \
done
# Source bashrc to load asdf and installed languages
RUN . ~/.bashrc
# --------------------------------------------
# VS Code + extensions + MCPs + settings
# --------------------------------------------
COPY src/vscode "${VSCODE_DIR}/"
COPY src/vscode/settings.json /root/.local/share/code-server/User/settings.json
COPY src/vscode/extensions /root/.local/share/code-server/extensions/
COPY src/vscode/mcp.json /root/.local/share/code-server/User/mcp.json
RUN bash /opt/scripts/install_vscode.sh
# --------------------------------------------
# Workspace and shell + IDE config
# --------------------------------------------
RUN mkdir -p /workspace
WORKDIR /workspace
# Copy workspace config files
COPY src/workspace/. /workspace/
# Expose VS Code port
EXPOSE ${VSCODE_PORT}
# Start code-server on container start
COPY src/scripts/entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
CMD ["/opt/entrypoint.sh"]