chlebik / rhcsa-practice-questions

RHCSA practice questions for version 7/8
550 stars 231 forks source link

Podman folder can be maped using podman unshare chown uid:gid and using :Z upon create running #32

Closed benyaminl closed 2 years ago

benyaminl commented 2 years ago

Hello, I seen that podman now has update for ability to map subuid and subguid using unshare

Take example mysql using 27:27, you can map it into your /home/student folder, and using simpler command, you don't need to restorecon -Rv on it, because it automatically shared

example :

podman unshare chown 27:27 /home/student/mysql
podman run -itd --name mysql8 -v /home/student/mysql:/var/lib/mysql:Z -e MYSQL_ROOT_PASSWORD=my-secret-pw -p 13306:3306 docker.io/library/mysql:8.0

see the ...mysql:Z -e...

It's available since 9.0, as 8.0 exam already phased out in mid December 2022.

chlebik commented 2 years ago

Well but the notes are for 7 and partially 8, so the chane you're describing does not apply here.