I wanted to try to use Amazon Corretto so I tried
FROM maven:3.9.3-amazoncorretto-17
ARG CHROME_VERSION=113.0.5672.63-1
ADD google-chrome.repo /etc/yum.repos.d/google-chrome.repo
RUN microdnf install -y google-chrome-stable-$CHROME_VERSION \
&& sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
Per https://hub.docker.com/layers/library/maven/3.9.3-amazoncorretto-17/images/sha256-51a8ceaec1ddb3237be298e8f31e794b0e047855d88d8ceae5dbb672606fe4a6 maven:3.9.3-amazoncorretto-17 has amazonlinux:2, 2.0.20230612.0 as a base image
However I get an error
[3/5] RUN microdnf install -y google-chrome-stable-113.0.5672.63-1 && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome:
#7 2.618 /bin/sh: microdnf: command not found
I then tried (by adding RUN yum -y install microdnf
) but I got:
[2/6] RUN yum -y install microdnf:
#5 2.536 Loaded plugins: ovl, priorities
#5 27.24 9 packages excluded due to repository priority protections
#5 27.85 No package microdnf available.
#5 28.56 Error: Nothing to do
Is there a way to install microdnf (or dnf) for amazonlinux:2 ?
Hi Mike, unfortunately when I replace microdnf with yum I get: