Skip to content

Commit

Permalink
Add devcontainer, Dockerfile, config-local
Browse files Browse the repository at this point in the history
  • Loading branch information
lkurz committed Aug 26, 2024
1 parent d62d210 commit aa24302
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM debian:latest
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
# this user's GID/UID must match your local user UID/GID to avoid permission issues
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
# https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Install vim, git, process tools, lsb-release
&& apt-get install -y \
git \
#
# Install ruby
&& apt-get install -y \
make \
build-essential \
ruby \
ruby-dev \
#
# Install jekyll
&& gem install \
bundler \
jekyll \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll
{
"name": "Jekyll",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bookworm"

// or use Dockerfile?
// comment out image and uncomment build
//{
// "build": {
// // Path is relative to the devcontainer.json file.
// "dockerfile": "Dockerfile"
// }
//}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "jekyll --version"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.exclude": {
"journals/*": true
}
}
23 changes: 23 additions & 0 deletions _config-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
remote_theme: pages-themes/minimal@v0.2.0
plugins:
# - jekyll-remote-theme # add this line to the plugins list if you already have one
- jekyll-redirect-from
title: The HDF Group
description: Ensuring long-term access and usability of HDF data and supporting users of HDF technologies

logo: /assets/img/logo.png
show_downloads: false
site.github.is_user_page: false
google_analytics: G-XQWF3YLCRQ
# theme: jekyll-theme-minimal # uses remote theme above

defaults:
- scope:
path: ""
values:
layout: default

url: localhost:4000
baseurl: ""

url_docs: "https:docs.hdfgroup.org"

0 comments on commit aa24302

Please sign in to comment.