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:
William Easton 2018-03-01 13:54:49 -06:00 committed by Travis Plunk
parent 390036c9a7
commit bd441d7aca
3 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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" ]

View file

@ -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" ]