Added user tranga to container and set permissions
This commit is contained in:
parent
58040ecb10
commit
c580fafc62
15
Dockerfile
15
Dockerfile
@ -10,7 +10,20 @@ RUN dotnet restore /src/Tranga/Tranga.csproj
|
||||
RUN dotnet publish -c Release -o /publish
|
||||
|
||||
FROM glax/tranga-base:latest as runtime
|
||||
EXPOSE 6531
|
||||
ARG UNAME=tranga
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
RUN groupadd -g $GID -o $UNAME
|
||||
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
|
||||
RUN mkdir /usr/share/tranga-api
|
||||
RUN mkdir /Manga
|
||||
RUN chown 1000:1000 /usr/share/tranga-api
|
||||
RUN chown 1000:1000 /Manga
|
||||
USER $UNAME
|
||||
|
||||
WORKDIR /publish
|
||||
COPY --from=build-env /publish .
|
||||
EXPOSE 6531
|
||||
USER 0
|
||||
RUN chown 1000:1000 /publish
|
||||
ENTRYPOINT ["dotnet", "/publish/Tranga.dll", "-c"]
|
||||
|
Loading…
Reference in New Issue
Block a user