Skip to content

Commit

Permalink
Merge tag '2.0.6' into dev
Browse files Browse the repository at this point in the history
Remove non-root user from Dockerfile
  • Loading branch information
KarmaKamikaze committed Sep 25, 2024
2 parents 294fc0a + 15069de commit 51f3463
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions MoxfieldPriceScraper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
FROM alpine:3.20 AS base

RUN useradd -m moxfieldpricescraper
USER moxfieldpricescraper

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
ARG BUILD_CONFIGURATION=Release
WORKDIR /app

Expand Down Expand Up @@ -29,9 +34,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN useradd -m moxfieldpricescraper && chown -R moxfieldpricescraper /app
USER moxfieldpricescraper

COPY --from=build-env /app/out .

HEALTHCHECK --interval=5m --timeout=1m --start-period=30s --retries=3 CMD ["dotnet", "MoxfieldPriceScraper.dll", "healthcheck"]
Expand Down

0 comments on commit 51f3463

Please sign in to comment.