From 8af8b916d414dcb23f3fb2aac95bc717c054f304 Mon Sep 17 00:00:00 2001 From: Alex Laurie Date: Wed, 11 Dec 2024 10:40:18 +1000 Subject: [PATCH] Revert "Several tweaks to #709" --- .devcontainer/Dockerfile | 13 +++---------- .devcontainer/devcontainer.json | 22 ++++++---------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 303d1d9..a3a2db7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -16,20 +16,13 @@ RUN dnf update -y && \ # Set up arguments for Hugo installation ARG HUGO_VERSION=latest ARG HUGO_VARIANT=hugo_extended -ARG WORKSPACE_DIR # Download and install Hugo RUN if [ "$HUGO_VERSION" = "latest" ]; then \ HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}'); \ fi && \ - ARCH=$(uname -m) && \ - case "$ARCH" in \ - "x86_64") HUGO_ARCH="64bit";; \ - "arm64"|"aarch64") HUGO_ARCH="arm64";; \ - *) echo "Unsupported architecture: $ARCH" && exit 1;; \ - esac && \ echo "Installing Hugo version: ${HUGO_VERSION}" && \ - wget -O hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_VARIANT}_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz && \ + wget -O hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_VARIANT}_${HUGO_VERSION}_Linux-64bit.tar.gz && \ tar -xzf hugo.tar.gz && \ mv hugo /usr/local/bin/hugo && \ chmod +x /usr/local/bin/hugo && \ @@ -50,8 +43,8 @@ USER vscode # Expose port for Hugo server EXPOSE 1313 -# Set the working directory to the container workspace directory -WORKDIR ${WORKSPACE_DIR} +# Set the working directory +WORKDIR /workspace # Set the default command to run Hugo server CMD ["hugo", "server", "--bind=0.0.0.0"] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 861a834..cd7a6a7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,13 @@ { "name": "AlmaLinux_WWW_Container", - "overrideCommand": false, "build": { "dockerfile": "Dockerfile", "args": { "VARIANT": "hugo", - "VERSION": "latest", - "WORKSPACE_DIR": "${containerWorkspaceFolder}" + "VERSION": "latest" } }, + "customizations": { "vscode": { "extensions": [ @@ -17,19 +16,10 @@ "esbenp.prettier-vscode", "yzhang.markdown-all-in-one", "tamasfe.even-better-toml" - ], - "settings": { - "terminal.integrated.defaultProfile.linux": "bash", - "terminal.integrated.profiles.linux": { - "bash": { - "path": "/bin/bash", - "icon": "terminal-bash" - } - } - } - } + ] + }, + "terminal.integrated.shell.linux": "/bin/bash" }, "forwardPorts": [1313], - "remoteUser": "vscode", - "postCreateCommand": "echo 'function git_branch() { local branch; branch=\"$(git symbolic-ref --short HEAD 2> /dev/null)\"; if [[ -n \"$branch\" ]]; then echo -n \"$branch\"; return 0; fi; return 1; } && function git_has_changes() { git diff --quiet HEAD 2> /dev/null || echo -n \"✗\"; } && export WHITE=\"\\[\\033[1;37m\\]\" && export GREEN=\"\\[\\033[0;32m\\]\" && export BLUE=\"\\[\\033[0;94m\\]\" && export RED=\"\\[\\033[1;31m\\]\" && export YELLOW=\"\\[\\033[1;33m\\]\" && export RESET=\"\\[\\033[0m\\]\" && function prompt_command() { PS1=\"${GREEN}\\u${WHITE} ➜ ${BLUE}\\w ${BLUE}(${RED}\\$(git_branch)${YELLOW}\\$(git_has_changes)${BLUE})${RESET}$ \"; } && export PROMPT_COMMAND=\"prompt_command\"' >> ~/.bashrc" + "remoteUser": "vscode" }