Skip to content

Try new docker image #41194

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

Merged
merged 4 commits into from
May 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions eng/docker/rhel.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile that creates a container suitable to build dotnet-cli
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-rpmpkg-20210714125435-9b5bbc2
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-rpmpkg-20220505130359-d0fa36f

# Setup User to match Host User, and give superuser permissions
ARG USER
Expand All @@ -9,22 +9,12 @@ ARG WORKDIR

WORKDIR ${WORKDIR}

# Workaround per https://github.com/dotnet/aspnetcore/pull/37192#issuecomment-936589233
RUN gem uninstall fpm
RUN yum remove -y rubygems
RUN yum remove -y ruby-devel
RUN yum --enablerepo=centos-sclo-rh -y install rh-ruby25
RUN yum --enablerepo=centos-sclo-rh -y install rh-ruby25-ruby-devel
RUN yum --enablerepo=centos-sclo-rh -y install rh-ruby25-rubygems
RUN scl enable rh-ruby25 'gem install --no-document fpm'

RUN useradd -m ${USER} --uid ${USER_ID} -g root
RUN echo '${USER} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# With the User Change, we need to change permssions on these directories
RUN chmod -R a+rwx /usr/local
RUN chmod -R a+rwx /home
RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo

# Set user to the one we just created
USER $USER_ID
Expand Down