Public | Automated Build

Last pushed: 2 years ago
Short Description
Resize S3 images on the fly
Full Description

Dockerfile for NodeJS Image server

Installs the Image-Resizer server with all dependencies.
This docker image is based on the libvips image created by Marc Bachmann.

Supported tags

How to run

Run it using:

$ docker run \
    --name=<YOUR CONTAINER NAME> \
    -d \
    -p 8090:8080 \
    -e AWS_ACCESS_KEY_ID=<INSERT HERE> \
    -e AWS_SECRET_ACCESS_KEY=<INSERT HERE> \
    -e AWS_REGION=<INSERT HERE> \
    -e S3_BUCKET=<INSERT HERE> \
    -e TWITTER_CONSUMER_KEY=<INSERT HERE> \
    -e TWITTER_CONSUMER_SECRET=<INSERT HERE> \
    -e TWITTER_ACCESS_TOKEN=<INSERT HERE> \
    -e TWITTER_ACCESS_TOKEN_SECRET=<INSERT HERE> \
    -e SOCIAL_IMAGE_EXPIRY=86400 \
    -e IMAGE_EXPIRY=2592000 \
    -e IMAGE_EXPIRY_SHORT=86400 \
    -e JSON_EXPIRY=2592000 \
    risul/node-image-server:latest

More info about the environment variables

Usage

While this image will work as a standalone app, almost all of its facility is moot unless you run it behind a CDN.

CDN examples:

  • http://my.cdn.com/s50/path/to/image.png
  • http://my.cdn.com/h50/path/to/image.png
  • http://my.cdn.com/h50-w100/path/to/image.png
  • http://my.cdn.com/s50-gne/path/to/image.png
  • http://my.cdn.com/path/to/image.png - original image request, will be optimized but not resized

Without CDN:

  • http://hostname:port/s50/path/to/image.png
  • http://hostname:port/h50/path/to/image.png
  • http://hostname:port/h50-w100/path/to/image.png
  • http://hostname:port/s50-gne/path/to/image.png
  • http://hostname:port/path/to/image.png - original image request, will be optimized but not resized

More details about how to use!

License

Licensed under MIT

Docker Pull Command
Owner
risul

Comments (0)