How to deploy imgproxy to Google Cloud using Docker and Cloud Run

Goal

Be able to host a production instance of imgproxy on Google Cloud within minutes.

Walkthrough

  1. Open the Cloud Terminal
  2. Follow the Before you begin section listed here (https://cloud.google.com/container-registry/docs/pushing-and-pulling)

    • $ sudo usermod -a -G docker ${USER}
    • $ gcloud auth configure-docker
  3. Pull the latest docker image (https://docs.imgproxy.net/#/installation)

    • $ docker pull darthsim/imgproxy:latest
  4. Tag the container

    • $ docker tag darthsim/imgproxy gcr.io/xxxxxxx-public-assets/imgproxy
  5. Push the container

    • $ docker push gcr.io/xxxxxxx-public-assets/imgproxy
    • Copy the sha (i.e. sha256:12345...54321)
  6. Head to Cloud Run
  7. Create Service

    • Enter your service name
    • Click Allow unauthenticated invocations
    • Hit Next, click Select on the input and search for the desired image
    • Alternatively, manually build the url and paste the sha (or gcr.io/xxxxxxx-public-assets/imgproxy@sha256:12345...54321)