From 8a751271e994df820a6fc4772c216aaabf1a92bc Mon Sep 17 00:00:00 2001 From: Ira Limitanei Date: Mon, 13 May 2024 15:14:33 +0900 Subject: [PATCH 1/3] feat: add powershell toolbox packages --- toolboxes/powershell-toolbox/packages.powershell | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 toolboxes/powershell-toolbox/packages.powershell diff --git a/toolboxes/powershell-toolbox/packages.powershell b/toolboxes/powershell-toolbox/packages.powershell new file mode 100644 index 0000000..6b837e6 --- /dev/null +++ b/toolboxes/powershell-toolbox/packages.powershell @@ -0,0 +1,10 @@ +ca-certificates +curl +libffi +libgcc +libssl3 +libstdc++ +openssl +powershell +python3 +zlib From 7bcabab531fcaf82a5bc488fc8f9f2ad80478a34 Mon Sep 17 00:00:00 2001 From: Ira Limitanei Date: Mon, 13 May 2024 15:18:09 +0900 Subject: [PATCH 2/3] feat: add powershell toolbox container file --- .../Containerfile.powershell | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 toolboxes/powershell-toolbox/Containerfile.powershell diff --git a/toolboxes/powershell-toolbox/Containerfile.powershell b/toolboxes/powershell-toolbox/Containerfile.powershell new file mode 100644 index 0000000..bf232b3 --- /dev/null +++ b/toolboxes/powershell-toolbox/Containerfile.powershell @@ -0,0 +1,32 @@ +# hadolint ignore=DL3007 +FROM ghcr.io/ublue-os/wolfi-base:latest + +LABEL com.github.containers.toolbox="true" \ + name="powershell-toolbox" \ + usage="This image is meant to be used with the toolbox or distrobox command" \ + description="A container image with integrated Powershell and Microsoft tooling for development environments." + +# COPY ./toolboxes/powershell-toolbox/packages.powershell /tmp +COPY packages.powershell /tmp + +SHELL ["/bin/ash", "-eo", "pipefail", "-c"] + +RUN apk upgrade && \ + grep -v '^#' /tmp/packages.powershell | xargs apk add --no-cache + +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 + +RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel LTS -InstallDir /usr/share/dotnet \ + && ln -sf /usr/share/dotnet/dotnet /usr/bin/dotnet + +ENV VIRTUAL_ENV=/.venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +# hadolint ignore=DL3013 +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir --prefer-binary setuptools azure-cli && \ + az config set core.collect_telemetry=no && \ + rm -rf /tmp/* + From c107aba0225a34030c6f433767c72664960fb8a7 Mon Sep 17 00:00:00 2001 From: Ira Limitanei Date: Mon, 13 May 2024 18:15:06 +0900 Subject: [PATCH 3/3] fix: use wolfi packages --- .../powershell-toolbox/Containerfile.powershell | 12 +----------- toolboxes/powershell-toolbox/packages.powershell | 11 ++--------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/toolboxes/powershell-toolbox/Containerfile.powershell b/toolboxes/powershell-toolbox/Containerfile.powershell index bf232b3..6babe01 100644 --- a/toolboxes/powershell-toolbox/Containerfile.powershell +++ b/toolboxes/powershell-toolbox/Containerfile.powershell @@ -17,16 +17,6 @@ RUN apk upgrade && \ ENV POWERSHELL_TELEMETRY_OPTOUT=1 ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 -RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel LTS -InstallDir /usr/share/dotnet \ - && ln -sf /usr/share/dotnet/dotnet /usr/bin/dotnet - -ENV VIRTUAL_ENV=/.venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -# hadolint ignore=DL3013 -RUN pip3 install --no-cache-dir --upgrade pip && \ - pip3 install --no-cache-dir --prefer-binary setuptools azure-cli && \ - az config set core.collect_telemetry=no && \ +RUN az config set core.collect_telemetry=no && \ rm -rf /tmp/* diff --git a/toolboxes/powershell-toolbox/packages.powershell b/toolboxes/powershell-toolbox/packages.powershell index 6b837e6..a536a28 100644 --- a/toolboxes/powershell-toolbox/packages.powershell +++ b/toolboxes/powershell-toolbox/packages.powershell @@ -1,10 +1,3 @@ -ca-certificates -curl -libffi -libgcc -libssl3 -libstdc++ -openssl +az +dotnet-8-sdk powershell -python3 -zlib