Sign inSign up

weaponsforge/gatsby-cli

By weaponsforge

Updated almost 2 years ago

A collection of Docker images for various Gatsby CLI and Node versions

Image
Developer tools
Content management system
0

279

weaponsforge/gatsby-cli repository overview

gatsby-cli

A collection of development Docker images for running various Gatsby CLI versions in containers as an alternative to global installation "npm install -g gatsby-cli" on a host machine.

This monorepo repository contains Gatsby CLI runtimes in Docker images for each compatible Node version(s) for quick look-ups and inspection of existing Gatsby themes and starters.

Each image tag, having no versioning, contains the "latest" deployed updates.

GitHub Repository
https://github.com/weaponsforge/gatsby-dockerfiles


📦 Gatsby Dependencies

Here are some known Gatsby CLI versions and their compatible Node versions.

Gatsby CLIGatsby CLI
latest
Gatsby CLI
Version
Compatible Node
Versions
v5-v5.14.0v18.x (LTS), v20.x
v4latest-v4v4.25.014.x, 16.x, or 18.x
v3latest-v3v3.15.012.x, 14.x, or 16.x
v2latest-v2v2.19.3v12.x

🚀 Usage

  1. Clone or initialize an existing Gatsby starter template.

  2. Take note of the Gatsby app's required Gatsby CLI and Node version, which can be deduced from its "package.json", "package-lock.json", or "yarn.lock" files.

    • Pull the appropriate Docker image for the app. For example, to pull the Gatsby CLI v4 for Node 16 image:
      docker pull weaponsforge/gatsby-cli:v4-node16
  3. Preview the cloned Gatsby app by running one of the Gatsby CLI images. For example, to run the "gatsby develop" command (using PowerShell):

    docker run -it --rm -v ${pwd}:/app -w /app -v /app/node_modules -p 8000:8000 weaponsforge/gatsby-cli:v4-node16 sh -c "npm install && gatsby develop -H 0.0.0.0 --verbose"
    
  4. To run more Gatsby CLI available API commands:

    docker run -it --rm -v ${pwd}:/app weaponsforge/gatsby-cli:v4-node16 gatsby <API_COMMAND>
    

TIP:
Run the dockerized Gatsby CLI API commands using different Docker volume mount combinations to achieve the best results.

Tag summary

Content type

Image

Digest

sha256:76548f685

Size

706.8 MB

Last updated

almost 2 years ago

docker pull weaponsforge/gatsby-cli:v5-node20