From c97a4f594239e9d6554c957ef160cec5afaf4d5f Mon Sep 17 00:00:00 2001 From: Jimmy Briggs Date: Sat, 25 Mar 2023 20:38:53 -0400 Subject: [PATCH] bug: fix .devcontainer dotdir build issue (#35) --- Stucco/plasterManifest.xml | 4 +- .../Dockerfile | 58 +++++++++---------- .../devcontainer.json | 50 ++++++++-------- 3 files changed, 56 insertions(+), 56 deletions(-) rename Stucco/template/{.devcontainer => _devcontainer}/Dockerfile (98%) rename Stucco/template/{.devcontainer => _devcontainer}/devcontainer.json (97%) diff --git a/Stucco/plasterManifest.xml b/Stucco/plasterManifest.xml index 60a0b22..b6d7fb1 100644 --- a/Stucco/plasterManifest.xml +++ b/Stucco/plasterManifest.xml @@ -1,4 +1,4 @@ - + @@ -195,7 +195,7 @@ Creating an opinionated high-quality PowerShell module with psake tasks and GitH diff --git a/Stucco/template/.devcontainer/Dockerfile b/Stucco/template/_devcontainer/Dockerfile similarity index 98% rename from Stucco/template/.devcontainer/Dockerfile rename to Stucco/template/_devcontainer/Dockerfile index 83b10fd..b125e68 100644 --- a/Stucco/template/.devcontainer/Dockerfile +++ b/Stucco/template/_devcontainer/Dockerfile @@ -1,29 +1,29 @@ -#------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. -#------------------------------------------------------------------------------------------------------------- - -FROM mcr.microsoft.com/powershell:latest - -# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser" -# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs -# will be updated to match your local UID/GID (when using the dockerFile property). -# See https://aka.ms/vscode-remote/containers/non-root-user for details. -ARG USERNAME=vscode -ARG USER_UID=1000 -ARG USER_GID=$USER_UID - -# install git iproute2, process tools -RUN apt-get update && apt-get -y install git openssh-client less iproute2 procps \ - # 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/* +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM mcr.microsoft.com/powershell:latest + +# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser" +# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs +# will be updated to match your local UID/GID (when using the dockerFile property). +# See https://aka.ms/vscode-remote/containers/non-root-user for details. +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# install git iproute2, process tools +RUN apt-get update && apt-get -y install git openssh-client less iproute2 procps \ + # 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/* diff --git a/Stucco/template/.devcontainer/devcontainer.json b/Stucco/template/_devcontainer/devcontainer.json similarity index 97% rename from Stucco/template/.devcontainer/devcontainer.json rename to Stucco/template/_devcontainer/devcontainer.json index 37367ba..5b66b52 100644 --- a/Stucco/template/.devcontainer/devcontainer.json +++ b/Stucco/template/_devcontainer/devcontainer.json @@ -1,25 +1,25 @@ -{ - "name": "PowerShell", - "dockerFile": "Dockerfile", - // "image": "mcr.microsoft.com/powershell", - - // Set *default* container specific settings.json values on container create. - "settings": { - "terminal.integrated.shell.linux": "/usr/bin/pwsh" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-vscode.powershell", - "davidanson.vscode-markdownlint" - ], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Bootstrap build modules - "postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'", - - // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. - // "remoteUser": "vscode" -} +{ + "name": "PowerShell", + "dockerFile": "Dockerfile", + // "image": "mcr.microsoft.com/powershell", + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/usr/bin/pwsh" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-vscode.powershell", + "davidanson.vscode-markdownlint" + ], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Bootstrap build modules + "postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'", + + // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. + // "remoteUser": "vscode" +}