浏览代码

Remove automatic permission changing in Docker image

Tulir Asokan 5 年之前
父节点
当前提交
dc5d9eb826
共有 2 个文件被更改,包括 1 次插入11 次删除
  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
   && cp mautrix_signal/example-config.yaml . && rm -rf mautrix_signal
 
 
 VOLUME /data
 VOLUME /data
-ENV UID=1337 GID=1337
 
 
 CMD ["/opt/mautrix-signal/docker-run.sh"]
 CMD ["/opt/mautrix-signal/docker-run.sh"]

+ 1 - 10
docker-run.sh

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