Docker image commands

List docker images on my system

docker image ls

Create a new image with new tag based on an original image

docker image tag {ORIGIN_IMAGE}:{ORIGIN_TAG} {TARGET_NAME}:{TARGET_TAG}

To build an image based on a dockerfile

docker image build -t {IMAGE_NAME} {DOCKERFILE_PATH}

To push on dockerhub

docker push {USERNAME}/mywebserver

To remove my custom image from cache

docker image rm {USERNAME}/mywebserver
Previous
Next