新增云原生开发配置文件,更新Dockerfile以支持Python环境和VSCode扩展,优化.vscode和.settings.yml文件以增强开发体验,简化数据库连接逻辑,确保代码结构清晰。

This commit is contained in:
dockermen
2025-04-11 10:59:41 +08:00
parent 1f86d12fad
commit f4fbae0ee4
9 changed files with 238 additions and 5 deletions

26
.ide/Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# .ide/Dockerfile
FROM python:3.13.3-alpine
ENV DEBIAN_FRONTEND=noninteractive
RUN pip install uv
# 安装 code-server 和扩展(使用 id 安装 python 扩展,使用 vsix 安装包安装 pylance 扩展)
RUN curl -fsSL https://code-server.dev/install.sh | sh \
&& code-server --install-extension ms-python.python \
&& code-server --install-extension ms-ceintl.vscode-language-pack-zh-hans \
&& code-server --install-extension bradlc.vscode-tailwindcss\
&& code-server --install-extension hansuxdev.bootstrap5-snippets \
&& code-server --install-extension abusaidm.html-snippets \
&& code-server --install-extension cstrap.flask-snippets \
&& code-server --install-extension saoudrizwan.claude-dev \
&& code-server --install-extension tencent-cloud.coding-copilot \
&& code-server --install-extension marscode.marscode-extension \
&& echo done
# 安装 ssh 服务,用于支持 VSCode 客户端通过 Remote-SSH 访问开发环境
RUN apt-get update && apt-get install -y wget unzip openssh-server
# 指定字符集支持命令行输入中文(根据需要选择字符集)
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8