소스 검색

Remove automatic permission changing in Docker image

Tulir Asokan 4 년 전
부모
커밋
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