Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gdbui_server/DockerFile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ FROM python:3.10-slim
# Set the working directory
WORKDIR /app

# Create a non-root user and group for runtime
RUN groupadd --system appgroup && useradd --system --gid appgroup --create-home appuser

# Copy only the requirements file first to leverage Docker cache
COPY requirements.txt .

Expand All @@ -15,5 +18,10 @@ RUN apt-get update && apt-get install -y gdb
# Copy the rest of the application code
COPY . .

# Ensure runtime directories are writable by the app user
RUN mkdir -p /app/output && chown -R appuser:appgroup /app

USER appuser

# Command to run the backend server
CMD ["python", "main.py"]
5 changes: 5 additions & 0 deletions webapp/DockerFile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ RUN npm install
# Copy the rest of the application code
COPY . .

# Use the non-root node user provided by the base image
RUN chown -R node:node /app

USER node

# Expose the port the frontend runs on
EXPOSE 5173

Expand Down