Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base & tools: Consolidate PowerShell setup #421

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

surajssd
Copy link
Member

@surajssd surajssd commented May 2, 2024

Move the powershell module installation from the
base Dockerfile to the tools Dockerfile into one
RUN command. This will help in reducing the number of layers in the Docker image, thus also reducing
the size of the image.

@surajssd surajssd requested a review from darrentu May 2, 2024 18:49
@surajssd
Copy link
Member Author

surajssd commented May 2, 2024

A test image: quay.io/surajd/cloudshell-tools:consolidate-powershell-setup-2024-05-May-02-18-42-34

@surajssd surajssd force-pushed the consolidate-powershell-setup branch 2 times, most recently from 25964a2 to 2be1f3b Compare May 2, 2024 21:13
@surajssd surajssd requested a review from annegeorge17 May 7, 2024 22:50
COPY ./linux/powershell/Invoke-PreparePowerShell.ps1 linux/powershell/Invoke-PreparePowerShell.ps1
# Copy and run script to install Powershell modules and setup Powershell machine profile
COPY ./linux/powershell/ powershell
RUN /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Base && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, that part is for the base.Dockerfile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes:

# Copy and run script to Install powershell modules
COPY ./linux/powershell/ powershell
RUN /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Base && rm -rf ./powershell

@surajssd surajssd force-pushed the consolidate-powershell-setup branch from 2be1f3b to c94b57b Compare May 9, 2024 19:35
@surajssd surajssd requested a review from darrentu June 13, 2024 22:48
@surajssd surajssd force-pushed the consolidate-powershell-setup branch from c94b57b to 3ac0fce Compare June 25, 2024 19:42
Move the powershell module installation from the
base Dockerfile to the tools Dockerfile into one
RUN command. This will help in reducing the number
of layers in the Docker image, thus also reducing
the size of the image.

Signed-off-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com>
@surajssd surajssd force-pushed the consolidate-powershell-setup branch from 3ac0fce to f170918 Compare June 26, 2024 21:28
@surajssd surajssd merged commit 31b483c into Azure:master Jun 26, 2024
2 checks passed
@surajssd surajssd deleted the consolidate-powershell-setup branch June 26, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants