/first-docker-app

My first docker app pushed on docker hub

Primary LanguageJava

first-docker-app

My first app pushed on docker hub

CREATING A DOCKER IMAGE

Navigate to the docker file location and execute the following command: $ docker build -f Dockerfile -t mydockerapp

TO RUN PROJECT FROM GENERATED IMAGE

$ docker run -p 9900:8080 mydockerapp

here, 8080 is source port and 9900 is the masking port

LOGIN TO DOCKER HUB

$ docker login Username: Password:

LINK YOUR LOCAL IMAGE WITH DOCKER HUB REPOSITORY

#$ docker tag / $ docker tag mydockerapp lemutugi/first-docker

PUSH IMAGE TO DOCKERHUB REPOSITORY

#$ docker push /: $ docker push leo/first-docker:latest

PULL IMAGE FROM DOCKERHUB REPOSITORY

#$ docker pull /: $ docker pull leo/first-docker:latest

TO LOGOUT FROM DOCKER

$ docker logout

$ docker exit