I created a MSSQL docker container based on the official image provided by Microsoft (https://hub.docker.com/_/microsoft-mssql-server).
I started a bash shell inside the running container and tried to delete some files.
sudo docker exec -it sql1 "bash"
Inside the container it is using the mssql account (by default).
And there seems to be some permission issues when I tried to delete the files.
rm -f *.csv
rm: cannot remove 'xxx.csv': Operation not permitted
How can I obtain the root permission to delete the file? I am not sure what default password I can use to run rm as root.
Thanks a lot!
You can specify the user as an argument:
sudo docker exec -it --user root sql1 "bash"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With