I have an sbt project and i am creating its Jar using the sbt publishLocal
command and i want a docker image for that i am doing something like this
FROM hseeberger/scala-sbt:11.0.2_2.12.8_1.2.8
MAINTAINER Sara Waheed <[email protected]>
WORKDIR /myproject
ADD . /myproject
# Define default command.
CMD ["sbt", "publishLocal"]
and i am building it docker build -t myproject:v1
and run it docker run myproject:v1
i have seen in the logs
[info] Main Java API documentation successful.
[info] Packaging /stripe-payment-account/target/myproject-1.0.1-javadoc.jar ...
[info] Done packaging.
[info] :: delivering :: com.test#myproject;1.0.1 :: 1.0.1 :: release :: Tue May 07 10:26:13 UTC 2019
[info] delivering ivy file to /stripe-payment-account/target/ivy-1.0.1.xml
[info] published myproject to /root/.ivy2/local/com.test/myproject/1.0.1/poms/myproject.pom
[info] published myproject to /root/.ivy2/local/com.test/myproject/1.0.1/jars/myproject.jar
[info] published myproject to /root/.ivy2/local/com.test/myproject/1.0.1/srcs/myproject-sources.jar
[info] published myproject to /root/.ivy2/local/com.test/myproject/1.0.1/docs/myproject-javadoc.jar
[info] published ivy to /root/.ivy2/local/com.test/myproject/1.0.1/ivys/ivy.xml
[success] Total time: 77 s, completed May 7, 2019, 10:26:13 AM
and when i try to look the file contents of this container via
docker exec -t -i containerid /bin/bash
and look into
cd ///root/.ivy2
and ls -a only shows
. .. .sbt.ivy.lock cache
the local folder is missing here but when i run the container it shows that it created the jar in /root/.ivy2/local/com.test/myproject/1.0.1/docs/myproject-javadoc.jar
why its not showing the local folder in .ivy2
folder what i am doing wrong here?