v.0.0.0 initial
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
GIT_USER_NAME=tiijay
|
||||
GIT_USER_EMAIL=git@th-jahn.de
|
||||
@@ -0,0 +1,26 @@
|
||||
FROM node:20-slim
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
sudo \
|
||||
openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN echo "node ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/node-sudo \
|
||||
&& chmod 0440 /etc/sudoers.d/node-sudo
|
||||
|
||||
# Pre-create workspace and node_modules with node user permissions
|
||||
RUN mkdir -p /workspace/node_modules && chown -R node:node /workspace
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
USER node
|
||||
|
||||
ARG GIT_USER_NAME
|
||||
ARG GIT_USER_EMAIL
|
||||
|
||||
RUN git config --global user.name "${GIT_USER_NAME}" && \
|
||||
git config --global user.email "${GIT_USER_EMAIL}"
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Vue 3 Dev Container (Slim)",
|
||||
"dockerComposeFile": "docker-compose.yaml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
"mounts": [
|
||||
"source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,type=bind,readonly"
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"Vue.volar",
|
||||
"hollowtree.vue-snippets",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode"
|
||||
],
|
||||
"settings": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
||||
},
|
||||
"remoteUser": "node",
|
||||
"forwardPorts": [3000]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
GIT_USER_NAME: ${GIT_USER_NAME}
|
||||
GIT_USER_EMAIL: ${GIT_USER_EMAIL}
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
- node_modules:/workspace/node_modules
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
tty: true
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
Reference in New Issue
Block a user