Fix: Devcontainer permission (#3102)

# Description of Changes

Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
This commit is contained in:
Ludy 2025-03-02 21:13:14 +01:00 committed by GitHub
parent 89022c0a24
commit 57a49444c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 8 deletions

View File

@ -6,7 +6,7 @@
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile.dev",
"dockerfile": "../Dockerfile.dev"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"appPort": [8080],
@ -110,5 +110,5 @@
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "devuser",
"shutdownAction": "stopContainer",
"postStartCommand": "chmod +x scripts/init-setup.sh && ./scripts/init-setup.sh"
"postStartCommand": "./scripts/init-setup.sh"
}

View File

@ -43,11 +43,8 @@ RUN mkdir -p /home/devuser/{configs,logs,customFiles,pipeline/watchedFolders,pip
&& adduser --disabled-password --gecos '' devuser \
&& chown -R devuser:devuser /home/devuser
RUN mkdir -p /home/devuser/logs && chown devuser:devuser /home/devuser/logs
RUN mkdir -p /workspace/logs && chown devuser:devuser /workspace/logs
RUN mkdir -p /workspace/src && chown devuser:devuser /workspace/src
RUN mkdir -p /workspace/src/main && chown devuser:devuser /workspace/src/main
RUN mkdir -p /workspace/src/main/resources && chown devuser:devuser /workspace/src/main/resources
RUN mkdir -p /home/devuser/logs /workspace/logs /workspace/scripts /workspace/src/main/resources \
&& chown -R devuser:devuser /home/devuser /workspace
# Setze das Arbeitsverzeichnis (wird später per Bind-Mount überschrieben)
WORKDIR /workspace

View File

@ -5,4 +5,4 @@ whoami
cd "$(dirname "$0")/.."
./gradlew bootRun
echo "Devcontainer started..."