Docker: Important Docker Commands Help
Dockerfile:
FROM adoptopenjdk/openjdk11:latest
ADD "target/docker-demo-0.0.1-SNAPSHOT.jar" "docker-demo.jar"
ENTRYPOINT ["java","-jar","docker-demo.jar"]
Docker Commands:
Build Docker Image:
docker build -t docker-demo .
Tag Docker Image:
docker tag docker-demo dineshnithdocker/docker-demo
Push Docker Image to Docker Hub
docker push dineshnithdocker/docker-demo
Check docker Images present in local:
docker images
Remove Local Docker Images:
docker rmi docker-demo dineshnithdocker/docker-demo
Pull Docker Images from Docker Hub and run:
docker run -p 8080:8080 dineshnithdocker/docker-demo
No comments:
Post a Comment