A collection of Docker images for various Gatsby CLI and Node versions
279
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
Here are some known Gatsby CLI versions and their compatible Node versions.
| Gatsby CLI | Gatsby CLI latest | Gatsby CLI Version | Compatible Node Versions |
|---|---|---|---|
| v5 | - | v5.14.0 | v18.x (LTS), v20.x |
| v4 | latest-v4 | v4.25.0 | 14.x, 16.x, or 18.x |
| v3 | latest-v3 | v3.15.0 | 12.x, 14.x, or 16.x |
| v2 | latest-v2 | v2.19.3 | v12.x |
Clone or initialize an existing Gatsby starter template.
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.
docker pull weaponsforge/gatsby-cli:v4-node16Preview 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"
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.
Content type
Image
Digest
sha256:76548f685…
Size
706.8 MB
Last updated
almost 2 years ago
docker pull weaponsforge/gatsby-cli:v5-node20