Skip to content

Commit

Permalink
fix(docker): permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jim60105 committed Dec 12, 2023
1 parent 460bc2d commit 655bf2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ FROM base AS final

ENV PATH="/app:$PATH"

RUN mkdir -p /app && chown -R $APP_UID:$APP_UID /app
RUN mkdir -p /app && chown -R $APP_UID:$APP_UID /app && chmod u+rwx /app
COPY --from=publish --chown=$APP_UID:$APP_UID /app/publish/YoutubeLiveChatToDiscord /app/YoutubeLiveChatToDiscord
COPY --from=publish --chown=$APP_UID:$APP_UID /app/publish/appsettings.json /app/appsettings.json

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ FROM base AS final

ENV PATH="/app:$PATH"

RUN mkdir -p /app && chown -R 1001:1001 /app
RUN mkdir -p /app && chown -R 1001:1001 /app && chmod u+rwx /app
COPY --from=publish --chown=1001:1001 /app/publish/YoutubeLiveChatToDiscord /app/YoutubeLiveChatToDiscord
COPY --from=publish --chown=1001:1001 /app/publish/appsettings.json /app/appsettings.json

Expand Down
11 changes: 3 additions & 8 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,11 @@ spec:
drop: ["ALL"]
seccompProfile:
type: "RuntimeDefault"
runAsUser: 1001
runAsGroup: 1001
runAsUser: 1654
runAsGroup: 1654
{{- if .useCookies }}
# copy /cookies.txt to /app/cookies.txt and run the original entrypoint ["dotnet", "YoutubeLiveChatToDiscord.dll"]
command:
- "/bin/sh"
- "-c"
- "cp /cookies.txt /app/cookies.txt && dotnet /app/YoutubeLiveChatToDiscord.dll {{ .youtubeId }} {{ .discordWebhook }}"
volumeMounts:
- mountPath: /cookies.txt
- mountPath: /app/cookies.txt
name: cookies
subPath: cookies.txt
volumes:
Expand Down

0 comments on commit 655bf2a

Please sign in to comment.