File tree 9 files changed +31
-57
lines changed
9 files changed +31
-57
lines changed Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:alpine-3.17
2
+ RUN apk update && apk upgrade --no-cache
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -36,7 +37,9 @@ RUN if [ "${LATEST}" = True ] ; then \
36
37
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers;\
40
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:debian-12
2
+ RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -36,7 +37,9 @@ RUN if [ "${LATEST}" = True ] ; then \
36
37
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
40
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:mariner-2.0
2
+ RUN tdnf update -y && tdnf upgrade -y && tdnf clean all
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -38,7 +39,9 @@ RUN if [ "${LATEST}" = True ] ; then \
38
39
tdnf install -y tar gzip && \
39
40
tdnf clean all && \
40
41
tar -zxvf ./latest.tar.gz -C ./latest && \
41
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
42
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
43
+ rm -fr latest &&\
44
+ rm -f latest.tar.gz ;\
42
45
else \
43
46
# install old azure-powershell from PSGallery
44
47
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:mariner-2.0-arm64
2
+ RUN tdnf update -y && tdnf upgrade -y && tdnf clean all
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -38,7 +39,9 @@ RUN if [ "${LATEST}" = True ] ; then \
38
39
tdnf install -y tar gzip && \
39
40
tdnf clean all && \
40
41
tar -zxvf ./latest.tar.gz -C ./latest && \
41
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
42
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
43
+ rm -fr latest &&\
44
+ rm -f latest.tar.gz ;\
42
45
else \
43
46
# install old azure-powershell from PSGallery
44
47
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:ubi-8
2
+ RUN yum update -y && yum clean all
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -36,7 +37,9 @@ RUN if [ "${LATEST}" = True ] ; then \
36
37
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
40
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:ubi-9
2
+ RUN dnf update -y && dnf clean all
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -36,7 +37,9 @@ RUN if [ "${LATEST}" = True ] ; then \
36
37
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
40
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:ubuntu-20.04
2
+ RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -36,7 +37,9 @@ RUN if [ "${LATEST}" = True ] ; then \
36
37
pwsh -Command Invoke-WebRequest -uri ${BLOB_URL} -OutFile latest.tar.gz && \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
- pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers ;\
40
+ pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers &&\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
Original file line number Diff line number Diff line change 1
1
FROM mcr.microsoft.com/powershell:ubuntu-22.04
2
+ RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
2
3
3
4
ARG REPOSITORY=PSGallery
4
5
ARG MODULE=Az
@@ -37,6 +38,8 @@ RUN if [ "${LATEST}" = True ] ; then \
37
38
mkdir latest && \
38
39
tar -zxvf ./latest.tar.gz -C ./latest && \
39
40
pwsh -Command ./latest/InstallModule.ps1 -Scope AllUsers;\
41
+ rm -fr latest &&\
42
+ rm -f latest.tar.gz ;\
40
43
else \
41
44
# install old azure-powershell from PSGallery
42
45
pwsh -Command Set-PSRepository -Name ${REPOSITORY} -InstallationPolicy Trusted && \
You can’t perform that action at this time.
0 commit comments