Skip to content
Merged
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
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Security

- Improved Docker container security by dynamically creating and running as a non-root user with UID/GID matching the GitHub Actions workspace, following SonarQube recommendations. This prevents privilege escalation and ensures safe file access. [#233]

## [1.2.1.19] - 2025-09-09

## Changed
Expand Down
9 changes: 3 additions & 6 deletions src/SemVer.Json/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env

# Copy everything and publish the release (publish implicitly restores and builds)
WORKDIR /app
COPY . .
RUN dotnet publish src/SemVer.Json/SemVer.Json.csproj -c Release -o out --no-self-contained
COPY . ./
RUN dotnet publish ./src/SemVer.Json/SemVer.Json.csproj -c Release -o out --no-self-contained

FROM mcr.microsoft.com/dotnet/runtime:9.0-alpine
RUN apk add --no-cache gosu
COPY --from=build-env /app/out .
COPY src/SemVer.Json/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh", "dotnet", "/SemVer.Json.dll" ]
ENTRYPOINT [ "dotnet", "/SemVer.Json.dll" ]
20 changes: 0 additions & 20 deletions src/SemVer.Json/entrypoint.sh

This file was deleted.

Loading