File tree Expand file tree Collapse file tree 2 files changed +43
-2
lines changed
components/workspace/python Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 1+ FROM labspace-workspace-base
2+
3+ USER root
4+ RUN apt update && \
5+ apt install -y curl jq python3 python3-dev python3-pip python3-venv && \
6+ rm -rf /var/lib/apt/lists/* && \
7+ ln -sf /usr/bin/python3 /usr/bin/python && \
8+ ln -sf /usr/bin/pip3 /usr/bin/pip && \
9+ mkdir -p /home/coder/.local/share/pip && \
10+ chown -R 1000:1000 /home/coder/.local/share/pip
11+
12+ # Install Poetry using pip (more reliable than the install script)
13+ RUN pip3 install --upgrade pip setuptools wheel --break-system-packages && \
14+ pip3 install poetry --break-system-packages
15+
16+ # Install additional Python development tools
17+ RUN pip3 install black flake8 pytest pytest-cov mypy isort --break-system-packages
18+
19+ # Make poetry available system-wide
20+ RUN ln -s /usr/local/bin/poetry /usr/bin/poetry && \
21+ mkdir -p /home/coder/.local/bin && \
22+ ln -s /usr/local/bin/poetry /home/coder/.local/bin/poetry && \
23+ chown -R 1000:1000 /home/coder/.local
24+
25+ USER 1000
26+ RUN code-server --install-extension ms-python.python && \
27+ code-server --install-extension ms-python.pylint && \
28+ code-server --install-extension ms-python.black-formatter && \
29+ rm -rf /home/coder/.local/share/code-server/CachedExtensionVSIXs/.trash/*
Original file line number Diff line number Diff line change @@ -23,15 +23,17 @@ group "default" {
2323 " dd-extension" ,
2424 " workspace-base" ,
2525 " workspace-node" ,
26- " workspace-java"
26+ " workspace-java" ,
27+ " workspace-python"
2728 ]
2829}
2930
3031target "workspaces" {
3132 targets = [
3233 " workspace-base" ,
3334 " workspace-node" ,
34- " workspace-java"
35+ " workspace-java" ,
36+ " workspace-python"
3537 ]
3638}
3739
@@ -102,6 +104,16 @@ target "workspace-java" {
102104 }
103105}
104106
107+ target "workspace-python" {
108+ inherits = [" _common" ]
109+ context = " ./components/workspace/python"
110+ tags = tags (IMAGE_NAMESPACE, " labspace-workspace-python" , IMAGE_TAG)
111+
112+ contexts = {
113+ labspace-workspace-base = " target:workspace-base"
114+ }
115+ }
116+
105117target "host-port-republisher" {
106118 inherits = [" _common" ]
107119 context = " ./components/host-port-republisher"
You can’t perform that action at this time.
0 commit comments