mirror of
https://github.com/data-privacy-stack/presidio.git
synced 2026-07-23 11:20:55 -05:00
Fix dev container permission issues (#1788)
* Fix dev container permission issues by removing USER directive Removes USER directive from Dockerfile.dev files to fix permission denied errors when accessing bind-mounted workspaces. Dev containers now run as root, which is standard practice for local development environments and matches the original working configuration before PR #1759. Fixes #1782 * Fix dev container permission issues and Poetry 2.0 compatibility - Remove USER directive from Dockerfile.dev files to fix permission errors - Remove poetry shell commands (not available in Poetry 2.0) - Configure VS Code to use Poetry venv automatically Fixes #1782 --------- Co-authored-by: Omri Mendels <omri374@users.noreply.github.com> Co-authored-by: Sharon Hart <sharonh.dev@gmail.com>
This commit is contained in:
@@ -9,13 +9,17 @@
|
||||
"POETRY_EXTRAS": "-E transformers"
|
||||
}
|
||||
},
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/presidio-analyzer,target=/workspace,type=bind",
|
||||
"workspaceFolder": "/workspace",
|
||||
"postCreateCommand": "chmod +x ./install_dependencies.sh && ./install_dependencies.sh",
|
||||
"postAttachCommand": "poetry shell",
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/presidio-analyzer,target=/workspace,type=bind",
|
||||
"workspaceFolder": "/workspace",
|
||||
"postCreateCommand": "chmod +x ./install_dependencies.sh && ./install_dependencies.sh",
|
||||
"customizations": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
],
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,15 @@
|
||||
},
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/presidio-analyzer,target=/workspace,type=bind",
|
||||
"workspaceFolder": "/workspace",
|
||||
"postAttachCommand": "chmod +x ./install_dependencies.sh && ./install_dependencies.sh && poetry shell",
|
||||
"postAttachCommand": "chmod +x ./install_dependencies.sh && ./install_dependencies.sh",
|
||||
"customizations": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
],
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,14 @@
|
||||
"install",
|
||||
"--no-interaction"
|
||||
],
|
||||
"postAttachCommand": "poetry shell",
|
||||
"customizations": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
],
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,14 @@
|
||||
"install",
|
||||
"--no-interaction"
|
||||
],
|
||||
"postAttachCommand": "poetry shell",
|
||||
"customizations": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
],
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,3 @@ RUN apt-get update \
|
||||
&& apt-get install -y build-essential
|
||||
|
||||
RUN pip install poetry
|
||||
|
||||
# Create a non-root user for development
|
||||
RUN useradd -m -u 1001 presidio
|
||||
|
||||
USER 1001
|
||||
|
||||
@@ -5,8 +5,3 @@ RUN apt-get update \
|
||||
&& apt-get install -y build-essential
|
||||
|
||||
RUN pip install poetry
|
||||
|
||||
# Create a non-root user for development
|
||||
RUN useradd -m -u 1001 presidio
|
||||
|
||||
USER 1001
|
||||
|
||||
@@ -13,9 +13,4 @@ RUN apt-get update \
|
||||
RUN apt-get update \
|
||||
&& apt-get install ffmpeg libsm6 libxext6 -y
|
||||
|
||||
RUN pip install poetry
|
||||
|
||||
# Create a non-root user for development
|
||||
RUN useradd -m -u 1001 presidio
|
||||
|
||||
USER 1001
|
||||
RUN pip install poetry
|
||||
Reference in New Issue
Block a user