Skip to content

Instantly share code, notes, and snippets.

@asage-me
Created October 5, 2024 14:30
Show Gist options
  • Save asage-me/94a91dad022d62599dac835103d2316f to your computer and use it in GitHub Desktop.
Save asage-me/94a91dad022d62599dac835103d2316f to your computer and use it in GitHub Desktop.
{
"name": "Jekyll",
"build": {
"dockerfile": "./Dockerfile",
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "none"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
}
},
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Shell
"timonwong.shellcheck",
"mkhl.shfmt",
// Common formatter
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one",
// Git
"mhutchie.git-graph"
]
}
},
"containerUser": "vscode",
"updateRemoteUserUID": true,
"containerEnv": {
"HOME": "/home/vscode"
},
"runArgs": [
"--userns=keep-id:uid=1000,gid=1000"
]
}
ARG VARIANT=3.3-bookworm
FROM mcr.microsoft.com/devcontainers/ruby:${VARIANT}
USER root
# ENV Variables required by Jekyll
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
TZ=Etc/UTC \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US
# Install bundler, latest jekyll, and github-pages for older jekyll
RUN gem update --system
# https://github.com/ntkme/sass-embedded-host-ruby/issues/130
RUN gem install sass-embedded -v 1.62.1
RUN gem install bundler jekyll github-pages
RUN chown -R "vscode:rvm" "/usr/local/rvm/" \
&& chmod -R g+r+w "/usr/local/rvm/" \
&& find "/usr/local/rvm/" -type d | xargs -n 1 chmod g+s
COPY post-create.sh /usr/local/post-create.sh
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment