Skip to content
Snippets Groups Projects
Commit 04f4a8a0 authored by David Trattnig's avatar David Trattnig
Browse files

chore: update to aura UID:GID, see aura#144

parent 8dfcbfb2
No related branches found
No related tags found
No related merge requests found
Pipeline #2886 passed
FROM python:3.10-slim as base
LABEL maintainer="David Trattnig <david@subsquare.at>"
ENV UID=1000
ENV GID=1000
ENV USER=app
ENV AURA_UID=2872
ENV AURA_GID=2872
# Configure Poetry
ENV POETRY_VERSION=1.3.2
......@@ -36,9 +36,12 @@ COPY ./config/sample.engine-api.docker.ini /srv/config/engine-api.ini
RUN poetry install --no-interaction --no-ansi
# Update Permissions
RUN set -e \
&& adduser --home /srv --no-create-home --system --uid ${UID} --group ${USER} \
&& chown -R ${UID}:${GID} /srv /etc/aura
RUN groupadd --gid ${AURA_GID} aura && \
useradd --gid ${AURA_GID} --no-user-group --uid ${AURA_UID} --home-dir /srv --no-create-home aura && \
chown -R ${AURA_UID}:${AURA_GID} /srv /etc/aura
USER aura
# Start Service
EXPOSE 8008
......
......@@ -20,6 +20,8 @@ AURA_ENGINE_API_HOST ?= 127.0.0.1
AURA_ENGINE_API_PORT ?= 8008
AURA_ENGINE_API_CONFIG := ${CURDIR}/config/engine-api.docker.ini
AURA_LOGS := ${CURDIR}/logs
AURA_UID := 2872
AURA_GID := 2872
DOCKER_RUN = @docker run \
--name $(APP_NAME) \
......@@ -28,7 +30,7 @@ DOCKER_RUN = @docker run \
--env-file docker.env \
-v "$(AURA_ENGINE_API_CONFIG)":"/etc/aura/engine-api.ini":ro \
-v "$(AURA_LOGS)":"/srv/logs" \
-u $(UID):$(GID) \
-u $(AURA_UID):$(AURA_GID) \
$(DOCKER_ENTRY_POINT) \
autoradio/$(APP_NAME)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment