dotnet / dotnet-buildtools-prereqs-docker

Used to maintain the Docker images hosted at the mcr.microsoft.com/dotnet-buildtools/prereqs image repository
MIT License
53 stars 99 forks source link

Add azure-cli to docker-testrunner #1057

Closed mthalman closed 1 month ago

mthalman commented 1 month ago

This adds azure-cli to the docker-testrunner image. This will be used to support the use of service connections for authenticating to an ACR.

mthalman commented 1 month ago

The pipeline failed when building the fpm Dockerfile with the error:

#5 42.37 ERROR:  Error installing fpm:
#5 42.37    ERROR: Failed to build gem native extension.
#5 42.37 
#5 42.37     current directory: /usr/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/ext/strscan
#5 42.37 /usr/bin/ruby -I /usr/lib/ruby/3.1.0 extconf.rb
#5 42.37 checking for onig_region_memsize() in ruby.h... *** extconf.rb failed ***
#5 42.37 Could not create Makefile due to some reason, probably lack of necessary
#5 42.37 libraries and/or headers.  Check the mkmf.log file for more details.  You may
#5 42.37 need configuration options.
#5 42.37 
#5 42.37 Provided configuration options:
#5 42.37    --with-opt-dir
#5 42.37    --without-opt-dir
#5 42.37    --with-opt-include
#5 42.37    --without-opt-include=${opt-dir}/include
#5 42.37    --with-opt-lib
#5 42.37    --without-opt-lib=${opt-dir}/lib
#5 42.37    --with-make-prog
#5 42.37    --without-make-prog
#5 42.37    --srcdir=.
#5 42.37    --curdir
#5 42.37    --ruby=/usr/bin/$(RUBY_BASE_NAME)
#5 42.37 /usr/lib/ruby/3.1.0/mkmf.rb:490:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
#5 42.37 You have to install development tools first.
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:583:in `try_link0'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:601:in `try_link'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:812:in `try_func'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:1116:in `block in have_func'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:989:in `block in checking_for'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:354:in `block (2 levels) in postpone'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:324:in `open'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:354:in `block in postpone'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:324:in `open'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:350:in `postpone'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:988:in `checking_for'
#5 42.37    from /usr/lib/ruby/3.1.0/mkmf.rb:1115:in `have_func'
#5 42.37    from extconf.rb:5:in `<main>'

I fixed this by installing the build-essential package. See https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1057/commits/8684878983c28638b63c9fc08746025261a88068