IMPORTANT NOTE: We're starting to migrate contents of this repo to the devcontainers org, as part of the work on the open dev container specification.
We'll now be publishing the jekyll image from devcontainers/images/src/jekyll.
For more details, you can review the announcement issue.
Develop static sites with Jekyll, includes everything you need to get up and running.
| Metadata | Value |
|---|---|
| Contributors | Carlos Mendible, parkr |
| Categories | Community, Languages, Frameworks |
| Definition type | Dockerfile |
| Published images | mcr.microsoft.com/vscode/devcontainers/jekyll |
| Available image variants | bullseye, buster (full list) |
| Published image architecture(s) | x86-64, arm64/aarch64 for bullseye variant |
| Works in Codespaces | Yes |
| Container host OS support | Linux, macOS, Windows |
| Container OS | Debian |
| Languages, platforms | Ruby, Jekyll |
See history for information on the contents of published images.
In addition to Ruby and Bundler, this development container installs Jekyll and the required tools at startup:
- If your Jekyll project contains a
Gemfilein the root folder, the development container will install all gems at startup by runningbundle install. This is the recommended approach as it allows you to specify the exact Jekyll version your project requires and list all additional Jekyll plugins. - If there's no
Gemfile, the development container will install Jekyll automatically, picking the latest version. You might need to manually install the other dependencies your project relies on, including all relevant Jekyll plugins.
While this definition should work unmodified, you can select the version of Debian the container uses by updating the VARIANT arg in the included devcontainer.json (and rebuilding if you've already created the container).
"args": { "VARIANT": "bullseye" }You can also directly reference pre-built versions of .devcontainer/base.Dockerfile by using the image property in .devcontainer/devcontainer.json or updating the FROM statement in your own Dockerfile to one of the following. An example Dockerfile is included in this repository.
mcr.microsoft.com/vscode/devcontainers/jekyll(latest)mcr.microsoft.com/vscode/devcontainers/jekyll:bullseyemcr.microsoft.com/vscode/devcontainers/jekyll:buster
You can decide how often you want updates by referencing a semantic version of each image. For example:
mcr.microsoft.com/vscode/devcontainers/jekyll:0(or0-bullseye,0-busterto pin to an OS version)mcr.microsoft.com/vscode/devcontainers/jekyll:0.1(or0.1-bullseye,0.1-busterto pin to an OS version)mcr.microsoft.com/vscode/devcontainers/jekyll:0.1.0(or0.1.0-bullseye,0.1.0-busterto pin to an OS version)
However, we only do security patching on the latest non-breaking, in support versions of images (e.g. 0-bullseye). You may want to run apt-get update && apt-get upgrade in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.
See history for information on the contents of each version and here for a complete list of available tags.
Alternatively, you can use the contents of base.Dockerfile to fully customize your container's contents or to build it for a container host architecture not supported by the image.
Given JavaScript front-end web client code written for use in conjunction with a Jekyll site often requires the use of Node.js-based utilities to build, this container also includes nvm so that you can easily install Node.js. You can change the version of Node.js installed or disable its installation by updating the args property in .devcontainer/devcontainer.json.
"args": {
"NODE_VERSION": "10"
}-
If this is your first time using a development container, please see getting started information on setting up Remote-Containers or creating a codespace using GitHub Codespaces.
-
Start VS Code and open your project folder or connect to a codespace.
-
Press F1 select and Add Development Container Configuration Files... command for Remote-Containers or Codespaces.
Note: If needed, you can drag-and-drop the
.devcontainerfolder from this sub-folder in a locally cloned copy of this repository into the VS Code file explorer instead of using the command. -
Select this definition. You may also need to select Show All Definitions... for it to appear.
-
Finally, press F1 and run Remote-Containers: Reopen Folder in Container or Codespaces: Rebuild Container to start using the definition.
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE.