Gatsby Docker

screenshot of Gatsby Docker

Docker image that builds and hosts a Gatsby site

Overview

If you’re a developer looking to streamline the deployment of your Gatsby site, the Gatsby Docker image offers a convenient solution. This community-maintained project enables you to easily build and host your Gatsby applications in a Dockerized environment. Although it currently does not support the latest features from Gatsby v3 and beyond, it remains a valuable tool for projects that do not require these advanced functionalities.

The Docker image supports multiple tags, ensuring that you can choose the right setup for your needs. Whether you're looking to serve your assets directly in production with Nginx or build your project into a new Docker image, this tool can help you simplify your workflow.

Features

  • Two Major Tags: The image provides latest for production use with Nginx and onbuild for building your project into a new Docker image.
  • Customizable Nginx Configuration: You can modify how Nginx behaves using environment variables, offering flexibility in deployment.
  • Environment Variables Support: Store configuration options in a single file using the --env-file flag to simplify your Docker run command.
  • Cachability Control: Fine-tune which paths should or shouldn’t be cacheable through configurable settings for CACHE_IGNORE and CACHE_PUBLIC.
  • Expiration Settings: Customize cache expiration times with CACHE_PUBLIC_EXPIRATION to manage how long assets remain in cache.
  • Community Maintained: As a community project, you can expect ongoing support from fellow developers, although it's important to note the limitations regarding newest Gatsby features.