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 11, 2023
1 parent 460bc2d commit b1d5394
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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
10 changes: 5 additions & 5 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ 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"]
# mount cookies.txt to /app/cookies.txt and run the original entrypoint ["/app/YoutubeLiveChatToDiscord"]
command:
- "/bin/sh"
- "-c"
- "cp /cookies.txt /app/cookies.txt && dotnet /app/YoutubeLiveChatToDiscord.dll {{ .youtubeId }} {{ .discordWebhook }}"
- "/app/cookies.txt && /app/YoutubeLiveChatToDiscord {{ .youtubeId }} {{ .discordWebhook }}"
volumeMounts:
- mountPath: /cookies.txt
- mountPath: /app/cookies.txt
name: cookies
subPath: cookies.txt
volumes:
Expand Down

0 comments on commit b1d5394

Please sign in to comment.