-
Notifications
You must be signed in to change notification settings - Fork 206
added install openssl-devel to amazonlinux2 Dockerfile #371
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
Conversation
Looks good to me @MarwaneKoutar, thanks. |
I understand your concern to not open the door to vendor requests and to keep the image as small as possible. However, I would like you to consider these three points: 1/ this is Amazon Linux and AWS SDK for Swift. This image is used by AWS customers using Swift, the vast majority will need to install the AWS SDK on it. I'm not asking to add this package on all Linux images, just the Amazon one. 2/ The slim images exist and they are minimal, a customer that wants the smallest possible image will use the slim version 3/ both Apple and Amazon are focus on customer experience. Given the fact that this is an Amazon Linux image, to be deployed on AWS, we want to give the best possible DX to our common customers. Let me know what the team decision is. Thanks |
@sebsto Thanks for the explanation! This does make sense because Amazon Linux 2 docker images are mostly used on AWS platforms. |
@swift-ci test |
Please also update the 5.10 Dockerfile. Thanks! |
Hey @shahmishal, I've just updated it. Thank you! |
@swift-ci test |
@swift-ci test |
@shahmishal could you please have a look at that? |
This looks good, I just noticed we would also want this updated on the nightly Dockerfiles too. |
@shahmishal would you like to also have this update on the buildx Dockerfiles? I've added it on the nightly-main too, is that good? |
Yes buildx too, thanks! |
@swift-ci test |
@MarwaneKoutar Please let me know once you have |
@shahmishal Sorry I've missed your last message. I just updated the buildx ones. |
@shahmishal Could you review it please? |
@swift-ci test |
@shahmishal Hello Mishal, I noticed the builds at Docker Hub are based on a 4 months commit. Thank you ! |
I just test the image and I confirm this change landed well. Thank you ! @MarwaneKoutar Time to update the build script of the SAM tLambda templates at |
Swift build for AWS Lambda failing
When using the command "swift package --disable-sandbox plugin archive" to build a Swift Lambda function that has aws-sdk-swift as a dependency, the build of it will fail because of a missing package in the image it uses. This is why I added openssl-devel in the install section.
Reproducing the Bug
for example
make sure to put this into Sources/HelloWorld/LambdaHandler.swift
The Error
The project would start compiling until it prints this:
Which basically says that it is missing some files
The Fix
Adding openssl-devel to the installed packages in the amazonlinux2 image which is the image that swift package uses.