Skip to content

Commit

Permalink
Update Docker user
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 28, 2022
1 parent 7c25e88 commit d327495
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Log
if: failure()
run: |
Hadolint outcome: ${{ steps.hadolint.outcome }} >> $GITHUB_STEP_SUMMARY
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY
check_changelog:
Expand Down
8 changes: 5 additions & 3 deletions DOCKER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## Build your own containers
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not
intended to use as a standalone container at this point.
intended to use as a standalone container at this point, and should be considered experimental.

```dockerfile
FROM lizardbyte/sunshine

# install Wayland and Steam
# install Steam, Wayland, etc.

ENTRYPOINT start-wayland && start-steam && start-sunshine
ENTRYPOINT steam && sunshine
```

## Where used
Expand Down Expand Up @@ -92,3 +92,5 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use id user as below
$ id dockeruser
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```

If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ RUN apt-get update -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp

# setup user
ARG PGID=1000
ENV PGID=${PGID}
Expand All @@ -75,18 +80,13 @@ ENV UNAME=${UNAME}
ENV HOME=/home/$UNAME

RUN groupadd -f -g "${PGID}" "${UNAME}" && \
useradd -mk "$(mktemp -d)" -u "${PUID}" -g "${PGID}" "${UNAME}"
useradd -lm -d ${HOME} -s /bin/bash -g "${PGID}" -G input -u "${PUID}" "${UNAME}" && \
mkdir -p ${HOME}/.config/sunshine && \
ln -s ${HOME}/.config/sunshine /config && \
chown -R ${UNAME} ${HOME}

USER ${UNAME}

# network setup
EXPOSE 47984-47990/tcp
EXPOSE 48010
EXPOSE 47998-48000/udp

# setup config directory
RUN mkdir -p ${HOME}/.config/sunshine && \
ln -s ${HOME}/config /config
WORKDIR ${HOME}

# entrypoint
ENTRYPOINT ["/usr/bin/sunshine"]

0 comments on commit d327495

Please sign in to comment.