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