Update Dockerfile-dev to fix plugin permissions

This patch changes the user creation to include creating
a home directory so the plugin install installs those plugins
as a --user option.
This commit is contained in:
Hemna 2023-07-17 21:57:39 +00:00
parent 2825cac446
commit d8318f2ae2
4 changed files with 5 additions and 5 deletions

View File

@ -12,12 +12,11 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
# cache is useless in docker image, so disable to reduce image size
PIP_NO_CACHE_DIR=1
WORKDIR /app
RUN set -ex \
# Create a non-root user
&& addgroup --system --gid 1001 appgroup \
&& adduser --system --uid 1001 --gid 1001 --no-create-home appuser \
&& useradd --uid 1001 --gid 1001 -s /usr/bin/bash -m -d /app appuser \
# Upgrade the package index and install security upgrades
&& apt-get update \
&& apt-get upgrade -y \
@ -31,6 +30,7 @@ RUN set -ex \
### Final stage
FROM build as final
WORKDIR /app
RUN git clone -b $APRSD_BRANCH https://github.com/craigerl/aprsd
RUN cd aprsd && pip install --no-cache-dir .

View File

@ -9,7 +9,7 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$plugin'"
pip3 install $plugin
pip3 install --user $plugin
done
fi

View File

@ -9,7 +9,7 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$plugin'"
pip3 install $plugin
pip3 install --user $plugin
done
fi

View File

@ -9,7 +9,7 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$plugin'"
pip3 install $plugin
pip3 install --user $plugin
done
fi