Docker - Build Image

Login to DockerHub:

docker login

Build image based on Dockerfile on . and tag as x/x:latest:

docker build -t x/x:latest .

Push built image to DockerHub:

docker push x/x:latest

Spin-up container based on built image:

docker run -it -d --name x --publish 8080:80 x/x:latest

Will download image from DockerHub if it doesn’t exist locally