Skip to content
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

linux/amd64 amazoncorretto:21 cant install software with yum, "SSL certificate problem: unable to get local issuer certificate" #182

Open
dgcooke opened this issue Sep 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dgcooke
Copy link

dgcooke commented Sep 28, 2023

Thank you for taking the time to help improve Corretto.

If your request concerns a security vulnerability then please report it by email to [email protected] instead of here.
(You can find more information regarding security issues at https://aws.amazon.com/security/vulnerability-reporting/.)

If your issue is specific to the Amazon Linux image these containers are built upon, please, consider opening an issue on the Amazon Linux Docker github repository

If your issue is specific to Corretto docker images,
then you are in the right place.
Please proceed with the following.

Describe the bug

A clear and concise description of what the bug is.
using the RUN yum -y install curl
This fails with the following error:
https://yum.corretto.aws/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "SSL certificate problem: unable to get local issuer certificate"

I tried also installing tar and gzip all had same issue, so I suggest it must be with yum

To Reproduce

Steps and (source) code to reproduce the behavior.

FROM --platform=linux/amd64 amazoncorretto:21
# Downloading and installing Maven
# - Define a constant with the version of maven you want to install
ARG MAVEN_VERSION=3.6.3
# - Create the directories, download maven, validate the download, install it, remove downloaded file and set links
RUN mkdir -p /usr/share/maven /usr/share/maven/ref
RUN yum -y install curl
RUN yum -y install tar
RUN yum -y install gzip
RUN yum -y install git

Expected behavior

A clear and concise description of what you expected to happen.
Should have installed the packages

Screenshots

If applicable, add screenshots to help explain your problem.

Platform information

Repository: dockerhub
Image tag: amazoncorretto:21

Additional context

Add any other context about the problem here.

@dgcooke dgcooke added the bug Something isn't working label Sep 28, 2023
@lutkerd
Copy link
Contributor

lutkerd commented Sep 28, 2023

Sorry you are running in to an issue. I was not able to reproduce the issue with the Dockerfile provided.

By any chance are you in a locked down network environment?
Are you able to resolve yum.corretto.aws from the host you are building the image on?

If it is a problem resolving corretto.aws domain but the amzn2-core repo is working ,you can update the Dockerfile to

FROM --platform=linux/amd64 amazoncorretto:21
# Downloading and installing Maven
# - Define a constant with the version of maven you want to install
ARG MAVEN_VERSION=3.6.3
# - Create the directories, download maven, validate the download, install it, remove downloaded file and set links
RUN mkdir -p /usr/share/maven /usr/share/maven/ref
RUN yum -y --disablerepo AmazonCorretto install curl tar gzip git

We leave the Corretto.aws repo configured as some customer want to be able to update a running docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants