I'm using Oracle Docker images to create a container with weblogic with a domain and a external volume so I can move there war files to deploy in the interface. All this was created with a user oracle with the group oinstall. However the volume is created with another user, this case vagrant.
I've tried with no success move the files as root and changing permissions from vagrant to oracle but later in the interface weblogic cannot deploy the file
With the command docker exec CONTAINER_ID id
I see that it has the uid, gid and groups for my oracle user. uid=1000(oracle) gid=1000(oracle) groups=1000(oracle)
as expected
I the script to create the image for the domain (12.2.1.3 btw) and after the following to create the container with the command:
docker run -d --name wlsadmin --hostname wlsadmin -p 7001:7001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD=weblogic123 -v /home/oracle/weblogicDomains/:/u01/oracle/user_projects 12213-domain
The expected result would be the creation of the volume with oracle and it's group however the result is the following:
[oracle@localhost weblogicDomains]$ ll
total 0
drwxr-x---. 3 vagrant vagrant 25 Apr 29 15:33 domains
Note that the folder weblogicDomains
created in the root of the oracle user has the right user and group set. A previous creation of docker container with Oracle12c with an external volume was well succeeded with the oracle as its user and oinstall as its group.
Found out why. Docker will create external volumes with the permission for the uid and gid 1000 (default user if I'm not mistaken) which for me is vagrant. The workaround I found was to give r/w permissions to others and with root move the file to the external volume and then in the interface it can be selected and deployed