mirror of
https://github.com/louislam/dockge.git
synced 2024-11-30 22:24:03 +00:00
devcontainer config
This commit is contained in:
parent
01906205f0
commit
8e362f3fa9
4 changed files with 69 additions and 0 deletions
43
.devcontainer/Dockerfile
Normal file
43
.devcontainer/Dockerfile
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Due to the bug of #145, Node.js's version cannot be changed, unless upstream is fixed.
|
||||||
|
# TODO: use proper devcontainer??
|
||||||
|
FROM node:18.17.1-bookworm
|
||||||
|
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
ENV NODE_ENV="development"
|
||||||
|
RUN apt update && apt install --yes --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gnupg \
|
||||||
|
unzip \
|
||||||
|
dumb-init \
|
||||||
|
sqlite3 \
|
||||||
|
&& install -m 0755 -d /etc/apt/keyrings \
|
||||||
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||||
|
&& chmod a+r /etc/apt/keyrings/docker.gpg \
|
||||||
|
&& echo \
|
||||||
|
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||||
|
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
||||||
|
tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||||
|
&& apt update \
|
||||||
|
&& apt --yes --no-install-recommends install \
|
||||||
|
docker-ce-cli \
|
||||||
|
docker-compose-plugin \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& npm install pnpm -g \
|
||||||
|
&& pnpm install -g tsx
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package.json and pnpm-lock.yaml to the working directory
|
||||||
|
COPY --chown=node:node ./package.json ./package.json
|
||||||
|
COPY --chown=node:node ./pnpm-lock.yaml ./pnpm-lock.yaml
|
||||||
|
RUN pnpm install
|
||||||
|
|
||||||
|
# Add the "node_modules" volume to enable caching
|
||||||
|
VOLUME [ "/app/node_modules" ]
|
||||||
|
VOLUME [ "/opt/stacks" ]
|
||||||
|
|
||||||
|
# Start the container with a shell by default
|
||||||
|
CMD [ "/bin/bash" ]
|
24
.devcontainer/devcontainer.json
Normal file
24
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"name": "Dockge",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
"context": ".."
|
||||||
|
},
|
||||||
|
"runArgs": [
|
||||||
|
"-v", "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
],
|
||||||
|
"forwardPorts": [5000, 5001, 9229],
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
|
"vue.volar",
|
||||||
|
"alexcvzz.vscode-sqlite"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ data
|
||||||
stacks
|
stacks
|
||||||
tmp
|
tmp
|
||||||
/private
|
/private
|
||||||
|
.pnpm-store
|
||||||
|
|
||||||
# Docker extra
|
# Docker extra
|
||||||
docker
|
docker
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@ data
|
||||||
stacks
|
stacks
|
||||||
tmp
|
tmp
|
||||||
/private
|
/private
|
||||||
|
.pnpm-store
|
||||||
|
|
||||||
# Git only
|
# Git only
|
||||||
frontend-dist
|
frontend-dist
|
||||||
|
|
Loading…
Reference in a new issue