Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 18, 16, 14
ARG BUILD_TARGET=dev
ARG NODE_VERSION=24
FROM mcr.microsoft.com/devcontainers/javascript-node:${NODE_VERSION} AS dev
FROM mcr.microsoft.com/devcontainers/javascript-node:${NODE_VERSION} AS base

# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
ARG HUGO_VARIANT=hugo
Expand All @@ -13,6 +14,8 @@ RUN export ARCH=$(uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/') \
&& dpkg -i ${HUGO_VARIANT}_${HUGO_VERSION}_linux-${ARCH}.deb \
&& rm ${HUGO_VARIANT}_${HUGO_VERSION}_linux-${ARCH}.deb

FROM base as dev

# Install gh cli repo
RUN sudo mkdir -p -m 755 /etc/apt/keyrings \
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
Expand Down Expand Up @@ -52,4 +55,6 @@ VOLUME [ "/home/node/.zsh" ]
# Hugo dev server port
EXPOSE 1313

FROM ${BUILD_TARGET}

USER node
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// Rebuild the container if it already exists to update.
"VERSION": "latest",
// Update NODE_VERSION to pick the Node.js version: 12, 14
"NODE_VERSION": "24"
"NODE_VERSION": "24",
"BUILD_TARGET": "${localEnv:BUILD_TARGET:dev}"
}
},
"features": {
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ permissions:
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/devcontainer
IMAGE_TAG: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || 'latest' }}
BUILD_TARGET: base

jobs:
prepare:
Expand Down