Explorar o código

Remove automatic permission changing in Docker image

Tulir Asokan %!s(int64=4) %!d(string=hai) anos
pai
achega
dc5d9eb826
Modificáronse 2 ficheiros con 1 adicións e 11 borrados
  1. 0 1
      Dockerfile
  2. 1 10
      docker-run.sh

+ 0 - 1
Dockerfile

@@ -43,6 +43,5 @@ RUN apk add git && pip3 install .[all] && apk del git \
   && cp mautrix_signal/example-config.yaml . && rm -rf mautrix_signal
 
 VOLUME /data
-ENV UID=1337 GID=1337
 
 CMD ["/opt/mautrix-signal/docker-run.sh"]

+ 1 - 10
docker-run.sh

@@ -1,10 +1,4 @@
 #!/bin/sh
-
-# Define functions.
-function fixperms {
-	chown -R $UID:$GID /data /opt/mautrix-signal
-}
-
 cd /opt/mautrix-signal
 
 if [ ! -f /data/config.yaml ]; then
@@ -13,7 +7,6 @@ if [ ! -f /data/config.yaml ]; then
 	echo "Copied default config file to /data/config.yaml"
 	echo "Modify that config file to your liking."
 	echo "Start the container again after that to generate the registration file."
-	fixperms
 	exit
 fi
 
@@ -22,9 +15,7 @@ if [ ! -f /data/registration.yaml ]; then
 	echo "Didn't find a registration file."
 	echo "Generated one for you."
 	echo "Copy that over to synapses app service directory."
-	fixperms
 	exit
 fi
 
-fixperms
-exec su-exec $UID:$GID python3 -m mautrix_signal -c /data/config.yaml
+exec python3 -m mautrix_signal -c /data/config.yaml