mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fix file permission issue in toxchat/bootstrap-node
/var/lib/tox-bootstrapd on the host is owned by hosts's tox-bootstrapd and chowned 700, but the container attempts to access it as its own tox-bootstrapd user with possibly different uid:gid, which will fail if host's tox-bootstrapd user has different uid:gid than the tox-bootstrapd user inside the container. This change makes the container use host's tox-bootstrapd uid:gid, which fixes the issue.
This commit is contained in:
parent
0538273479
commit
805858716e
|
@ -14,6 +14,7 @@ sudo useradd \
|
||||||
--user-group tox-bootstrapd
|
--user-group tox-bootstrapd
|
||||||
sudo chmod 700 /var/lib/tox-bootstrapd
|
sudo chmod 700 /var/lib/tox-bootstrapd
|
||||||
docker run -d --name tox-bootstrapd \
|
docker run -d --name tox-bootstrapd \
|
||||||
|
--user "$(id -u tox-bootstrapd):$(id -g tox-bootstrapd)" \
|
||||||
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
||||||
--ulimit nofile=32768:32768 \
|
--ulimit nofile=32768:32768 \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
|
|
|
@ -249,6 +249,7 @@ sudo useradd \
|
||||||
sudo chmod 700 /var/lib/tox-bootstrapd
|
sudo chmod 700 /var/lib/tox-bootstrapd
|
||||||
|
|
||||||
docker run -d --name tox-bootstrapd --restart always \
|
docker run -d --name tox-bootstrapd --restart always \
|
||||||
|
--user "$(id -u tox-bootstrapd):$(id -g tox-bootstrapd)" \
|
||||||
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
||||||
--ulimit nofile=32768:32768 \
|
--ulimit nofile=32768:32768 \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
|
@ -284,7 +285,9 @@ Then rebuild and run the image again:
|
||||||
```sh
|
```sh
|
||||||
tar c $(git ls-files) | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node -
|
tar c $(git ls-files) | docker build -f other/bootstrap_daemon/docker/Dockerfile -t toxchat/bootstrap-node -
|
||||||
docker run -d --name tox-bootstrapd --restart always \
|
docker run -d --name tox-bootstrapd --restart always \
|
||||||
|
--user "$(id -u tox-bootstrapd):$(id -g tox-bootstrapd)" \
|
||||||
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
-v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ \
|
||||||
|
--ulimit nofile=32768:32768 \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
-p 3389:3389 \
|
-p 3389:3389 \
|
||||||
-p 33445:33445 \
|
-p 33445:33445 \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user