Images Commands

(note if commands not working, terminal likely connect to OsX. Run Quickstart Terminal)

        1. $ docker - lists all available commands
        2. $ docker build -t <i-name> . - create image (w/name i-name) from Dockerfile in cwd
        3. $ docker pull [image name] - downloads from docker.hub
        4. $ docker run [image name] - runs the image (& pulls if not local)
        5. $ docker inspect [image name] - shows info on container (JSON) or image
        6. $ docker run <image-name> sleep 1000 - stop container after 1,000 seconds
        7. $ docker run -t -i busybox:1.24 - runs image (busybox:1.24) in interactive mode
        8. $ docker images - lists all images
        9. $ docker history <image-name> - see layers in image
        10. $ docker build -t dougwells/debian . - . = cwd (works if Dockerfile is in cwd
        11. $ docker -t <image_id> <new_name>:tag - Rename image,
        12. $ docker rmi 198 - removes image (only need first few parts of identifier)
        13. $ docker rmi $(docker images -q -f dangling=true) - delete all untagged image
        14. $ docker rmi $(docker images -q) - delete ALL images

results matching ""

    No results matching ""