switch to devcontainers
This commit is contained in:
parent
65c35a422c
commit
aa34b36608
7 changed files with 82 additions and 379 deletions
34
.devcontainer/Dockerfile
Normal file
34
.devcontainer/Dockerfile
Normal file
|
@ -0,0 +1,34 @@
|
|||
FROM ghcr.io/astral-sh/uv:0.5.24 AS uv
|
||||
FROM python:3.11-slim AS python
|
||||
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm
|
||||
LABEL repository="www.coastalcommits.com/cswimr/SeaCogs"
|
||||
LABEL maintainer="cswimr <seaswimmerthefsh@gmail.com>"
|
||||
|
||||
RUN apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Red-DiscordBot
|
||||
build-essential \
|
||||
git \
|
||||
# PyNaCl
|
||||
libsodium-dev \
|
||||
# CFFI
|
||||
libffi-dev \
|
||||
# SSH repository support
|
||||
openssh-client \
|
||||
# Cog dependencies
|
||||
# Audio
|
||||
openjdk-17-jre-headless \
|
||||
# PyLav
|
||||
libaio1 \
|
||||
libaio-dev \
|
||||
# SeaUtils
|
||||
dnsutils; \
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=uv --chown=vscode: /uv /uvx /bin/
|
||||
COPY --from=python --chown=vscode: /usr/local /usr/local
|
||||
|
||||
RUN ln -s /usr/local/bin/python3.11 /usr/local/bin/python; \
|
||||
python --version
|
35
.devcontainer/devcontainer.json
Normal file
35
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "Red-DiscordBot: SeaCogs",
|
||||
"build": {
|
||||
"context": "..",
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"charliermarsh.ruff",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-python.python",
|
||||
"tekumara.typos-vscode",
|
||||
"tamasfe.even-better-toml",
|
||||
"redhat.vscode-yaml",
|
||||
"DavidAnson.vscode-markdownlint",
|
||||
"yy0931.vscode-sqlite3-editor",
|
||||
"aaron-bond.better-comments",
|
||||
"donjayamanne.githistory",
|
||||
"eamodio.gitlens"
|
||||
]
|
||||
}
|
||||
},
|
||||
"containerEnv": {
|
||||
"DISPLAY": "dummy",
|
||||
"PYTHONUNBUFFERED": "True",
|
||||
"UV_LINK_MODE": "copy",
|
||||
"UV_PYTHON_PREFERENCE": "only-system",
|
||||
"UV_PYTHON_DOWNLOADS": "never",
|
||||
"PROJECT_DIR": "/workspaces/SeaCogs"
|
||||
},
|
||||
"mounts": ["source=uv-persistent-data,target=/workspaces/SeaCogs/.data,type=volume"],
|
||||
"postCreateCommand": "uv sync --frozen",
|
||||
"remoteUser": "vscode"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue