Run Docker Commands Using Google Cloud Shell | Scribe

    Run Docker Commands Using Google Cloud Shell

    • Cera Fisher |
    • 13 steps |
    • 3 minutes
    1
    Navigate to [https://cloud.google.com/](https://cloud.google.com/)
    2
    Click "Console"
    3
    Click here.
    4
    You'll probably see a message that says something like "Since you haven't used your Cloud Shell for a while, it may take some time to unarchive your disk."
    5
    Click "open_in_new" to expand this to a full window.
    6
    Click here.
    7
    Type "which docker" and press `enter`. If Docker is installed, it will show you the path for where docker is installed. It should be there by default, this is just to check.
    8
    We're going to use the basic Docker Hub ubuntu image, and we're going to select ubuntu:24.10 because that's a stable release. \ Navigate to DockerHub and click "Docker Official Image" on the left side of the page, under the header "Trusted Content." From there, find "ubuntu." Click to go to this image's repository page.
    9
    Click "Tags" -- we're going to find a recent stable release.
    10
    Find "ubuntu:24.10" and click the Copy button to copy the Docker command to your clipboard.
    11
    Go back to your Cloud Shell tab and paste your `docker pull` command in. It will "pull" the Docker Image so that it's available to you.
    12
    Type "docker run -it ubuntu:24.10 [[enter]]" This will run the Docker image in an interactive container. This lets you explore what is installed and whether the software you need is present. (If it's not, this is also a way that you can install software and create a new Docker image that has the software installed, but that's another walkthrough.)
    13
    Find out if zgrep is installed. \ \ Type "which zgrep" and hit enter [[enter]]" Click here.
    information ordinal icon
    This Docker image has zgrep installed, so you can use it to create your zgrep tool.