Sign inSign up

egorovli/image-optimizer

By egorovli

•Updated almost 7 years ago

A service to optimize jpg images with cjpeg

Image
1

933

egorovli/image-optimizer repository overview

⁠image-optimizer Go Report Card Docker Registry Docker Automated build Image Layers

image-optimizer is a Docker⁠ image based on the latest Alpine linux⁠ to provide microservice of optimizing jpeg images.

⁠Usage

Run image-optimizer with docker:

$ docker run \
  -d \
  -p 8080:8080 \
  --name image-optimizer \
  egorovli/image-optimizer

Or embed it into your docker-compose.yml:

version: '3'
services:
  # ...

  image-optimizer:
    image: egorovli/image-optimizer
    expose:
      - "8080"

  some-service:
    # ...
    links:
      - image-optimizer

⁠Configuration

Configuration is supplied via environment variables and the supports the following options:

Environment VariableTypeDescriptionDefault Value
ENVstringEnvironmentproduction
PORTintPort to bind to8080
HOSTstringHost to listen on0.0.0.0
QUALITYintDefault quality to use in cjpeg conversion80
EXECUTABLE_PATHstringExecutable path to callcjpeg

⁠API

⁠POST, PUT /

Receives binary file and attempts to optimize it with cjpeg.

⁠GET /health

Get current status of the app.

Tag summary

Content type

Image

Digest

Size

6.5 MB

Last updated

almost 7 years ago

docker pull egorovli/image-optimizer