First pull the source code using
git pull url
Note: We always need to give jar files, never give source code in git hub.
Now, open the Dockerfile by using cat command
Now, let us build without copying the source code
docker build -f Dockerfile . --tag sprin-boot:2.5.5
Now, run docker run command
docker run -dit --name hello -p 8080:8080 sprin-boot:2.5.5
Go to AWS Account
Browse with public IP Address
We can share this url so that others can also join
Now we need to tag
If u are not able to push then tag that image
docker tag sprin-boot:2.5.5 uday9287/dockerhub:sprin-bootimagepush
Then run the below push command
docker push uday9287/dockerhub:sprin-bootimagepush
Now, if this we can confirm that , we never share the source code
Complete Commands
No comments:
Post a Comment
Thank you for visiting my blog