Skip to content

A docker image for thumbor with AWS S3 / Minio integration for cropping, resizing, applying filters and optimizing images on the fly.

License

Notifications You must be signed in to change notification settings

beeyev/thumbor-s3-docker

Repository files navigation

A Docker image for Thumbor with AWS S3 and Minio integration, designed for on-the-fly image cropping, resizing, applying filters, and image optimization.

A little of introduction

Thumbor S3 Docker is available in two variants of docker images, a lightweight (slim) - slim-alpine and a full-featured - debian.

All current docker images are packed with these features:

  • AWS S3 / Minio integration support
  • jpegtran (already enabled) lossless jpeg optimizer which can make jpegs smaller by optimizing DCT coefficients.
  • gifsicle allows to generate proper animated gifs, as well as static gifs with the smallest possible size.
  • thumbor-aws Official extension for asynchronous non-blocking AWS S3 support.
  • sentry-client Sentry error handling client.
  • Support for Prometheus metrics collector.
  • Healthcheck inside the docker container is already configured, it controls that Thumbor service works properly.

The full-featured (debian) version provides all possible functionality such as:

  • gifv optimizer which is able to convert gifs to mp4 or webm videos, often resulting in dramatically smaller sized files.
  • Facial Detection support.
  • Ability to process SVG, AVIF and HEIF files.
  • Lazy Detection functionality.
  • Image Metadata allows to work with image's metadata.
  • High Efficiency Image Format avif, heif support.

Before choosing the full-featured image version, make sure that you really need this extra functionality, as the resulting Docker container is three times larger than slim-alpine.

Currently maintained docker images:

beeyev/thumbor-s3:debian
beeyev/thumbor-s3:slim-alpine
beeyev/thumbor-s3:7-debian
beeyev/thumbor-s3:7-slim-alpine
beeyev/thumbor-s3:7.7-debian
beeyev/thumbor-s3:7.7-slim-alpine

Docker Hub | Github packages | Red Hat quay.io

Configuring Thumbor S3

All the configuration can be done via environment variables. For a list of all the variables, please check this config file.
Use variable names from the file as the environment variables to configure your docker container. Besides the variables mentioned in the above config file, there are some additional environment variables:

  • PORT - The port to run this Thumbor instance at. Default: 8888
  • LOG_LEVEL - The log level to be used. Possible values are: debug, info, warning, error, critical. Default: warning
  • NUM_PROCESSES - Number of Thumbor processes to run. Possible values are: 0 - auto detect, 1 - no forks created, or set your number. Default: 0

Also, don't forget to take a look at the official documentation on how to use Thumbor imaging.

Securing thumbor

On production systems please consider the following options:

  • ALLOW_UNSAFE_URL (default False): Disallow "unsafe" (non HMAC-signed) URLs Docs
  • SECURITY_KEY (default 31337): a shared secret for HMAC-signing URLs

Please check out HMAC signing in the docs for more information.

Volume mapping

/data:/data

Healthcheck

On production, you should enable a healthcheck to make sure, that your service is up and running. Luckily thumbor comes with a simple healthcheck API built-in.

By default, it's https//host:port/healthcheck/.

How to use this image

Please take a look at this example, it explains everything you need to know to begin working with Thumbor.

Issues

Bug reports and feature requests can be submitted on the Github Issue Tracker.

Credits

Thumbor contributors

License

The MIT License (MIT). Please see License File for more information.


If you love this project, please consider giving me a ⭐

Docker Pulls

About

A docker image for thumbor with AWS S3 / Minio integration for cropping, resizing, applying filters and optimizing images on the fly.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •