Develop GatsbyJs sites using Docker container based on Alpine Linux
284
Source for Docker container to run amazing blazing fast GatsbyJs static site generator. It includes all you need to start right now.
git clone https://github.com/caxapyk/gatsbyjs-docker
cd gatsbyjs-docker
docker build --rm --no-cache -t gatsby .
or just pull pre-build image from Docker Hub:
docker pull caxapyk/gatsbyjs-docker
Create a new site. gatsby new gatsby-site. When creating a new site, you can optionally specify a starter to base your new site on e.g.
docker run --rm -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker new [SITE_DIRECTORY] [URL_OF_STARTER_GITHUB_REPO]
Read more at official docs.
Gatsby will start a hot-reloading development environment accessible at localhost:8000.
docker run --rm -it -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker develop
Gatsby will perform an optimized production build for your site generating static HTML and per-route JavaScript code bundles.
docker run --rm -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker build
Gatsby starts a local HTML server for testing your built site accessible at localhost:8000.
docker run --rm -it -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker serve
You can use Npm or Yarn for manipulating dependencies.
docker run --rm -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker npm install --save <PACKAGE_NAME>
docker run --rm -v $PWD:/srv/gatsby -p 8000:8000 caxapyk/gatsbyjs-docker yarn add <PACKAGE_NAME>
Content type
Image
Digest
Size
119.4 MB
Last updated
over 8 years ago
docker pull caxapyk/gatsbyjs-docker