From f6d21ea54d76c8fc3f5c36526b6a6e095d454996 Mon Sep 17 00:00:00 2001 From: mauwii Date: Fri, 27 Oct 2023 08:19:19 +0200 Subject: [PATCH 1/2] add nvm, update readme and bake-file - update pulumi version to 3.91.0 - set CARGO_HOME to `/usr/local/cargo` - set RUSTUP_HOME to `/usr/local/rustup` - remove warning from readme --- README.md | 3 --- docker-bake.hcl | 6 +++--- linux/ubuntu/Dockerfile | 11 +++++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e9f479c..8ea58ae 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,6 @@ [![Docker-Hub description workflow badge][Docker-Hub-description-badge]][Workflow-DockerHubDescription] [![Mergify badge][mergify-badge]][mergify] [![License badge][License-badge]][License] -> [!WARNING] -> Heavily under construction, so please do not use this anywhere in production - ## What The docker images in this repository are made to be used with [nektos/act][nektos-act-repo], which diff --git a/docker-bake.hcl b/docker-bake.hcl index c2ccd53..dfe697b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -71,7 +71,7 @@ variable "NODE_VERSION" { } variable "PULUMI_VERSION" { - default = "3.89.0" + default = "3.91.0" } variable "POWERSHELL_AZ_MODULE_VERSIONS" { @@ -113,7 +113,7 @@ target "ubuntu" { } args = { BICEP_VERSION = BICEP_VERSION - CARGO_HOME = "/etc/.skel/.cargo" + CARGO_HOME = "/usr/local/cargo" CODENAME = release.codename DEPENDENCIES = DEPENDENCIES DOTNET_CHANNEL = release.DOTNET_CHANNEL @@ -133,7 +133,7 @@ target "ubuntu" { POWERSHELL_MODULES = POWERSHELL_MODULES POWERSHELL_VERSION = release.POWERSHELL_VERSION PULUMI_VERSION = PULUMI_VERSION - RUSTUP_HOME = "/etc/.skel/.rustup" + RUSTUP_HOME = "/usr/local/rustup" TOOL_PATH_PWSH = "/usr/share/powershell" } name = "ubuntu-act-${release.codename}" diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index 7046737..3d77d86 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -368,6 +368,17 @@ RUN [ "${NODE_VERSION}" != "" ] || (echo "missing build-arg NODE_VERSION" && exi && npm --version \ && node --version +# Install nvm +# hadolint ignore=SC2016,SC1091 +RUN export NVM_DIR=/etc/skel/.nvm \ + && mkdir -p "${NVM_DIR}" \ + && VERSION=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') \ + && curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash \ + && echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment \ + && echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile \ + && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \ + && nvm alias default system + # Install YARN RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg \ | apt-key add - \ From 4011710a73f66588959b42042f4b20343f6ca87d Mon Sep 17 00:00:00 2001 From: mauwii Date: Fri, 27 Oct 2023 12:47:54 +0200 Subject: [PATCH 2/2] set rust profile to minimal --- linux/ubuntu/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index 3d77d86..c76d557 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -227,12 +227,12 @@ ARG TARGETARCH SHELL [ "/bin/bash", "--login", "-e", "-o", "pipefail", "-c" ] ARG RUSTUP_HOME ARG CARGO_HOME -ARG RUSTUP_DEFAULT_TOOLCHAIN=stable ENV PATH=${CARGO_HOME}/bin:${PATH} RUN curl -fsSL https://sh.rustup.rs \ | sh -s -- \ -y \ - --default-toolchain=${RUSTUP_DEFAULT_TOOLCHAIN} \ + --default-toolchain=stable \ + --profile minimal \ && cargo --version \ && rustc --version