From ad04039146e5f2c7fc2b37712a16ca1fa35addbf Mon Sep 17 00:00:00 2001 From: Heikki-Jussi Niemi Date: Mon, 21 Feb 2022 12:08:35 +0200 Subject: [PATCH 1/3] Change to Azure Cloudshell --- Dockerfile | 5 ++--- Jenkinsfile | 4 ++-- README.md | 8 +------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f2eeee..ee3f619 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/powershell:7.1.0-alpine-3.12-20201116 +FROM mcr.microsoft.com\azure-cloudshell@sha256:075eadba1d78d537fa188fe82d4bc0f6e552ab3416d60c0b43bff5fd5372535e COPY ./Login.ps1 /etc/util-scripts/Login.ps1 @@ -21,5 +21,4 @@ RUN addgroup -S -g ${DOCKER_GID} docker && \ adduser -S -G docker docker && \ adduser -G docker -u 1000 -D jenkins -RUN pwsh -command 'Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force -RequiredVersion 4.2.0' && \ - chmod +x /etc/util-scripts/Login.ps1 +RUN chmod +x /etc/util-scripts/Login.ps1 diff --git a/Jenkinsfile b/Jenkinsfile index 2123612..4a49b44 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -library 'jenkins-ptcs-library@3.0.0' +library 'jenkins-ptcs-library@4.0.3' podTemplate(label: pod.label, containers: pod.templates @@ -12,4 +12,4 @@ podTemplate(label: pod.label, publishTagToDockerhub("azure-ci-toolbox") } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 1ee3932..22437f2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ # azure-ci-container -Since is not supported and broken -we use extended self built image for CI. - -## Tools - -- Powershell 7 -- Powershell AZ module +https://github.com/Azure/CloudShell with docker in docker -support. From 69e5ee220947e319cd9e8c933d910237d4517f6f Mon Sep 17 00:00:00 2001 From: Heikki-Jussi Niemi Date: Mon, 21 Feb 2022 12:15:52 +0200 Subject: [PATCH 2/3] Update reference --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ee3f619..c4332fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com\azure-cloudshell@sha256:075eadba1d78d537fa188fe82d4bc0f6e552ab3416d60c0b43bff5fd5372535e +FROM mcr.microsoft.com/azure-cloudshell@sha256:075eadba1d78d537fa188fe82d4bc0f6e552ab3416d60c0b43bff5fd5372535e COPY ./Login.ps1 /etc/util-scripts/Login.ps1 From 6f7018aaaf568f9094dfe98f491732b4286c6f29 Mon Sep 17 00:00:00 2001 From: Heikki-Jussi Niemi Date: Mon, 21 Feb 2022 12:39:39 +0200 Subject: [PATCH 3/3] Fix commands --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4332fc..a15185c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG DOCKER_VERSION="18.03.1" ARG DOCKER_URI="https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-ce.tgz" ARG DOCKER_GID="412" -RUN apk --no-cache add curl && \ +RUN apt install curl && \ curl ${DOCKER_URI} -o /tmp/docker-${DOCKER_VERSION}.tgz && \ cd /tmp && \ tar -xvzf /tmp/docker-${DOCKER_VERSION}.tgz docker/docker && \ @@ -17,8 +17,8 @@ RUN apk --no-cache add curl && \ rm -v /tmp/docker-${DOCKER_VERSION}.tgz && \ chmod -v +x ${DOCKER_PATH}/docker -RUN addgroup -S -g ${DOCKER_GID} docker && \ - adduser -S -G docker docker && \ - adduser -G docker -u 1000 -D jenkins +RUN addgroup --system --gid ${DOCKER_GID} docker && \ + adduser --system --ingroup docker docker && \ + adduser --ingroup docker -u 1000 --disabled-password jenkins RUN chmod +x /etc/util-scripts/Login.ps1