{"id":22118365,"url":"https://github.com/ghchinoy/thumbor-container","last_synced_at":"2026-01-04T18:41:09.327Z","repository":{"id":146327147,"uuid":"218436934","full_name":"ghchinoy/thumbor-container","owner":"ghchinoy","description":"thumbor in a container, via gcp cloud build and cloud run","archived":false,"fork":false,"pushed_at":"2021-09-11T20:15:03.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T12:11:18.276Z","etag":null,"topics":["cloud-build","cloud-run","thumbor","thumbor-docker"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghchinoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-30T03:36:00.000Z","updated_at":"2021-09-11T19:52:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c80b1cf8-4302-4642-b652-2572958a1f29","html_url":"https://github.com/ghchinoy/thumbor-container","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghchinoy%2Fthumbor-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghchinoy%2Fthumbor-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghchinoy%2Fthumbor-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghchinoy%2Fthumbor-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghchinoy","download_url":"https://codeload.github.com/ghchinoy/thumbor-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217946,"owners_count":20579300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-build","cloud-run","thumbor","thumbor-docker"],"created_at":"2024-12-01T13:49:28.480Z","updated_at":"2026-01-04T18:41:09.295Z","avatar_url":"https://github.com/ghchinoy.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# thumbor-container\n\n[thumbor](http://thumbor.org/) in a Docker container.\n\nInspired by the [web.dev](https://web.dev/blog) blog post _[How to install the Thumbor image CDN](https://web.dev/install-thumbor/)_ by Katie Hempenius, this details both the process to put thumbor in a container (even though there are better containers out there, such as [minimalcompact/thumbor](https://hub.docker.com/r/minimalcompact/thumbor)) and how to use Google Cloud Platform to build and host thumbor.\n\ntl;dr: \n[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run?git_repo=https://github.com/ghchinoy/thumbor-container)\n\n## container usage\n\nUse the container directly as published at [ghchinoy/thumbor](https://hub.docker.com/r/ghchinoy/thumbor) or build and deploy it as per below.\n\n```\ndocker run -d -p 8080:8080 -e ALLOW_UNSAFE_URL=True ghchinoy/thumbor\n```\n\nIf you want to use the HMAC security, supply your own SECRET_KEY environment variable, sort of like this (and remember it, since you'll have to use that to encode your URLs):\n\n```\nSECURITY_KEY=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)\ndocker run -d -p 8080:8080 -e SECURITY_KEY=${SECURITY_KEY} ghchinoy/thumbor\n```\n\n## building\n\nUse the included Dockerfile to build the container in the standard manner:\n\n```\ndocker build -t thumbor .\n```\n\nOr, use the Google Cloud Platform Cloud Build service to build the container for you. The [first 120 build-minutes per day are free](https://cloud.google.com/cloud-build/pricing), even though you have to enable billing for your GCP account. See also the [container registry](https://cloud.google.com/container-registry/pricing) pricing for storage of and security scanning of containers.\n\nUse the included cloudbuild.yaml which uses an environment variable to specify your project, i.e. do something like this first: `export PROJECT_ID=thumbor-container` (substituting your own project name, of course).\n\nView build logs at your project name, ex. [thubmor-container](https://console.cloud.google.com/cloud-build/builds?project=thumbor-container)\n\n```\n# prerequisites\nexport PROJECT_ID=thumbor-container\n# create a gcp project\ngcloud projects create $PROJECT_ID\n# enable billing, find via `gcloud alpha billing account list`\ngcloud alpha billing projects link $PROJECT_ID --billing-account YOUR-ACCT-NUMB\n# enable cloud build service\ngcloud services enable cloudbuild.googleapis.com\n\n# build step\ngcloud builds submit --config cloudbuild.yaml .\n```\n\n## deploy\n\nOne can run the container from Docker hub registry, as above, or use Cloud Run to serve up the container! \n\nChoose a region and allow unauthenticated access, when asked.\n\n```\n# enable the API\ngcloud services enable run.googleapis.com\n\n# deploy to cloud run\ngcloud beta run deploy --image gcr.io/$PROJECT_ID/thumbor --platform managed --set-env-vars=ALLOW_UNSAFE_URL=True\n```\n\nAfter this is deployed, you'll see something like the following.\n\n```\nDeploying container to Cloud Run service [thumbor] in project [thumbor-container] region [us-central1]\n✓ Deploying... Done.                                                                                   \n  ✓ Creating Revision...                                                                               \n  ✓ Routing traffic...                                                                                 \nDone.                                                                                                  \nService [thumbor] revision [thumbor-xh4h4] has been deployed and is serving 100 percent of traffic at https://thumbor-3u7t5nnjpq-uc.a.run.app\n```\n\nTest with URLs in the blog posts _[Optimize images with Thumbor](https://web.dev/use-thumbor/)_ or _[How to install the Thumbor image CDN](https://web.dev/install-thumbor/)_.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghchinoy%2Fthumbor-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghchinoy%2Fthumbor-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghchinoy%2Fthumbor-container/lists"}