Cleanup after Powershell install for CentOS/Fedora Docker Images (#6264)
* Adding "yum clean all" to CentOS 7 Dockerfile reduces docker image size by 76MB * Adding "dnf clean all" to Fedora Dockerfile reduces docker image size by 168MB
This commit is contained in:
parent
390036c9a7
commit
bd441d7aca
|
@ -38,7 +38,8 @@ RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo | tee /etc/yum.r
|
|||
|
||||
# Install latest powershell from Microsoft YUM Repo
|
||||
RUN yum install -y \
|
||||
powershell
|
||||
powershell \
|
||||
&& yum clean all
|
||||
|
||||
# Use PowerShell as the default shell
|
||||
# Use array to avoid Docker prepending /bin/sh -c
|
||||
|
|
|
@ -37,7 +37,8 @@ RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
|||
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo | tee /etc/yum.repos.d/microsoft.repo
|
||||
|
||||
# Install latest powershell from Microsoft YUM Repo
|
||||
RUN dnf install -y powershell
|
||||
RUN dnf install -y powershell \
|
||||
&& dnf clean all
|
||||
|
||||
# Use array to avoid Docker prepending /bin/sh -c
|
||||
CMD [ "pwsh" ]
|
||||
|
|
|
@ -37,7 +37,8 @@ RUN localedef --charmap=UTF-8 --inputfile=en_US $LANG
|
|||
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo | tee /etc/yum.repos.d/microsoft.repo
|
||||
|
||||
# Install latest powershell from Microsoft YUM Repo
|
||||
RUN dnf install -y powershell
|
||||
RUN dnf install -y powershell \
|
||||
&& dnf clean all
|
||||
|
||||
# Use array to avoid Docker prepending /bin/sh -c
|
||||
CMD [ "pwsh" ]
|
||||
|
|
Loading…
Reference in a new issue