Installing directory in docker container and running gradle command
I have a mydockimage
docker container with with gradle installed in it.
I am mounting my local working directory with the following command
sudo docker run -t -a stdout -a stderr --rm \
--volume /home/Myworkspace/Myproject:/workspace:rw myimage:myimage_build
I have the following problems:
-
after running this command from
/home
, i am redirected to docker contanier folder/workspace
but when i run gradle the response hangs. -
if i run mount script from my local workspace folder then it redirects me to docker container with all files but with folder name and git branch name in flower bracket something like below
[ root@c6ff3f80dab8:/workspace {COE *} ]$
where COE is the name of the branch.
-
If I run
gradle build
in[ root@c6ff3f80dab8:/workspace {COE *} ]$
then the app works, but it goes back to my local directory and not sure how to find it in my docker container.
source to share