Set the UMASK in the entry script, added some brief step documentation, also Gitea action workflow attempt.
Build foundry vtt docker image and push to registry / docker (push) Failing after 9s
Build foundry vtt docker image and push to registry / docker (push) Failing after 9s
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
name: Build foundry vtt docker image and push to registry
|
||||||
|
run-name: ${{ gitea.actor }} is building image and pushing to registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# -
|
||||||
|
# name: Checkout
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: dockerregistry:5000
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASS }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: foundryvtt-docker:latest
|
||||||
+8
-7
@@ -3,25 +3,26 @@ LABEL maintainer="crovaxon"
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# user and group id are typical defaults for UNRAID
|
||||||
ENV PUID=99
|
ENV PUID=99
|
||||||
ENV PGID=100
|
ENV PGID=100
|
||||||
ENV UMASK=022
|
ENV UMASK=022
|
||||||
ENV PATH="/app:${PATH}"
|
ENV PATH="/app:${PATH}"
|
||||||
|
|
||||||
#RUN addgroup -g ${GUID} foundry
|
# update and install requirements
|
||||||
#RUN adduser -H -u ${PUID} -s /bin/bash foundry foundry
|
|
||||||
#USER foundry
|
|
||||||
|
|
||||||
RUN apk update & apk add --no-cache ca-certificates libstdc++ su-exec bash-completion tar nodejs npm
|
RUN apk update & apk add --no-cache ca-certificates libstdc++ su-exec bash-completion tar nodejs npm
|
||||||
|
|
||||||
|
# copy entrypoint script to work directory
|
||||||
COPY entrypoint.sh ./
|
COPY entrypoint.sh ./
|
||||||
|
|
||||||
# directory of the Foundry application
|
# mount volume directory of the Foundry application
|
||||||
VOLUME /foundry
|
VOLUME /foundry
|
||||||
#directory of the Foundry user data
|
|
||||||
|
# mount volume directory of the Foundry user data
|
||||||
VOLUME /foundrydata
|
VOLUME /foundrydata
|
||||||
|
|
||||||
# default TCP port
|
# expose default TCP port
|
||||||
EXPOSE 30000
|
EXPOSE 30000
|
||||||
|
|
||||||
|
#run entrypoint
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# set umask
|
||||||
|
umask ${UMASK}
|
||||||
|
|
||||||
|
# set permissions on application folder
|
||||||
chown -R ${PUID}:${PGID} /foundry
|
chown -R ${PUID}:${PGID} /foundry
|
||||||
|
|
||||||
|
# run Foundry with the environmentally set user and group id
|
||||||
exec su-exec ${PUID}:${PGID} node /foundry/resources/app/main.js --dataPath=/foundrydata
|
exec su-exec ${PUID}:${PGID} node /foundry/resources/app/main.js --dataPath=/foundrydata
|
||||||
Reference in New Issue
Block a user