mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #312 from pitkley/docker-fix-groupmod
Fix modifying the GID under alpine
This commit is contained in:
commit
08adb2f540
@ -17,7 +17,7 @@ ENV PAPERLESS_EXPORT_DIR=/export \
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apk --no-cache --update add \
|
RUN apk --no-cache --update add \
|
||||||
python3 gnupg libmagic bash \
|
python3 gnupg libmagic bash shadow \
|
||||||
sudo poppler tesseract-ocr imagemagick ghostscript unpaper && \
|
sudo poppler tesseract-ocr imagemagick ghostscript unpaper && \
|
||||||
apk --no-cache add --virtual .build-dependencies \
|
apk --no-cache add --virtual .build-dependencies \
|
||||||
python3-dev poppler-dev gcc g++ musl-dev zlib-dev jpeg-dev && \
|
python3-dev poppler-dev gcc g++ musl-dev zlib-dev jpeg-dev && \
|
||||||
|
@ -4,13 +4,13 @@ set -e
|
|||||||
# Source: https://github.com/sameersbn/docker-gitlab/
|
# Source: https://github.com/sameersbn/docker-gitlab/
|
||||||
map_uidgid() {
|
map_uidgid() {
|
||||||
USERMAP_ORIG_UID=$(id -u paperless)
|
USERMAP_ORIG_UID=$(id -u paperless)
|
||||||
USERMAP_ORIG_UID=$(id -g paperless)
|
USERMAP_ORIG_GID=$(id -g paperless)
|
||||||
USERMAP_GID=${USERMAP_GID:-${USERMAP_UID:-$USERMAP_ORIG_GID}}
|
USERMAP_NEW_UID=${USERMAP_UID:-$USERMAP_ORIG_UID}
|
||||||
USERMAP_UID=${USERMAP_UID:-$USERMAP_ORIG_UID}
|
USERMAP_NEW_GID=${USERMAP_GID:-${USERMAP_ORIG_GID:-$USERMAP_NEW_UID}}
|
||||||
if [[ ${USERMAP_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_GID} != "${USERMAP_ORIG_GID}" ]]; then
|
if [[ ${USERMAP_NEW_UID} != "${USERMAP_ORIG_UID}" || ${USERMAP_NEW_GID} != "${USERMAP_ORIG_GID}" ]]; then
|
||||||
echo "Mapping UID and GID for paperless:paperless to $USERMAP_UID:$USERMAP_GID"
|
echo "Mapping UID and GID for paperless:paperless to $USERMAP_NEW_UID:$USERMAP_NEW_GID"
|
||||||
addgroup -g "${USERMAP_GID}" paperless
|
usermod -u "${USERMAP_NEW_UID}" paperless
|
||||||
sed -i -e "s|:${USERMAP_ORIG_UID}:${USERMAP_GID}:|:${USERMAP_UID}:${USERMAP_GID}:|" /etc/passwd
|
groupmod -g "${USERMAP_NEW_GID}" paperless
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ install_languages() {
|
|||||||
if [ "$lang" == "eng" ]; then
|
if [ "$lang" == "eng" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if apk info -e "$pkg" > /dev/null 2>&1; then
|
if apk info -e "$pkg" > /dev/null 2>&1; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user