-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
I'm trying to setup oxidized using docker container using root user on hypervisor. And it doesn't create empty configuration file on first run:
# ls -la /etc/oxidized/
итого 16
drwxrwxrwx 2 root root 4096 фев 20 10:55 .
drwxr-xr-x 137 root root 12288 фев 20 10:36 ..
# docker run --rm -v /etc/oxidized:/home/oxidized/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest oxidized
edit ~/.config/oxidized/config
# ls -la /etc/oxidized/
итого 16
drwxrwxrwx 2 root root 4096 фев 20 10:55 .
drwxr-xr-x 137 root root 12288 фев 20 10:36 ..
# docker run --rm -v /etc/oxidized:/home/oxidized/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest whoami
root
Need to specify user in command when running new instance, but /etc/oxidized folder should be writeable to user with UID 30000:
# docker run -it --rm -v /etc/oxidized:/home/oxidized/.config/oxidized -p 8888:8888/tcp --user oxidized -t oxidized/oxidized:latest oxidized
# ls -la /etc/oxidized/
итого 16
drwxrwxrwx 2 root root 4096 фев 20 10:55 .
drwxr-xr-x 137 root root 12288 фев 20 10:36 ..
# docker run -it --rm -v /etc/oxidized:/home/oxidized/.config/oxidized -p 8888:8888/tcp --user oxidized -t oxidized/oxidized:latest oxidized
edit ~/.config/oxidized/config
# ls -la /etc/oxidized/
итого 20
drwxrwxrwx 2 root root 4096 фев 20 10:54 .
drwxr-xr-x 137 root root 12288 фев 20 10:36 ..
-rw-r--r-- 1 30000 30000 661 фев 20 10:54 config
or first run container with root mount:
# docker run -it --rm -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -t oxidized/oxidized:latest oxidized
# ls -la /etc/oxidized/
итого 20
drwxr-xr-x 2 root root 4096 фев 20 11:02 .
drwxr-xr-x 137 root root 12288 фев 20 10:36 ..
-rw-r--r-- 1 root root 643 фев 20 11:02 config
and after that modify folder permissions.
I will try 1st way.
Thank you for your program!
Reactions are currently unavailable