Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM python:3.11-slim

# Backwards compatible defaults
ENV USER=root
ENV GROUPNAME=root
ENV UID=0
ENV GID=0

SHELL ["/bin/bash", "-ec"]

RUN apt update && apt install --no-install-recommends -y bluez build-essential
Expand All @@ -9,4 +15,6 @@ RUN python3 -m venv /opt/venv && \
pip install --upgrade --extra-index-url=https://www.piwheels.org/simple pip TheengsGateway==1.5.0

COPY chroot /
CMD source /opt/venv/bin/activate && exec /opt/venv/start.sh
CMD (getent group "${GROUPNAME}" || groupadd -g "${GID}" "${GROUPNAME}") && \
(getent passwd "${USER}" || useradd -u "${UID}" -g "${GID}" -m "${USER}") && \
su -l -s "/bin/bash" -c "source /opt/venv/bin/activate && exec /opt/venv/start.sh" "${USER}"