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

Add amazon-corretto base image (21, 17) #207

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

kijuky
Copy link
Contributor

@kijuky kijuky commented Jul 31, 2022

  • copy eclipse-temurin dockerfile
  • change apt-get -> yum (for amazon linux)
    • The base image doesn't even have tar or gzip so I'm running that first.

@francisdb
Copy link
Collaborator

I wonder at what point github will tell us we have too many builds

Are you actively using jdk 8?
Maybe this belongs in a fork?

@kijuky
Copy link
Contributor Author

kijuky commented Aug 1, 2022

Are you actively using jdk 8?

surely.... 8 is erased.

@kijuky
Copy link
Contributor Author

kijuky commented Aug 1, 2022

I wonder at what point github will tell us we have too many builds

In many cases, having an LTS is enough. So just 11 and 17. If you ever need 18, make another pull request at that time.

@kijuky kijuky changed the title Add amazon-corretto base image (18, 17, 11, 8) Add amazon-corretto base image (17, 11) Aug 1, 2022
@francisdb
Copy link
Collaborator

francisdb commented Aug 1, 2022

Looks like the scala 3 docker build is failing on something related to tput in the scala startup script:

https://github.com/lampepfl/dotty/blob/1130c52a6476d473b41a598e23f0415e0f8d76dc/dist/bin/common#L31-L34

introduced in scala/scala3#10304

Also found this related thread
edeliver/edeliver#188 (comment)

Might be something to report on the dotty issue tracker

@francisdb
Copy link
Collaborator

see scala/scala3#15796

@francisdb
Copy link
Collaborator

you could try adding -pagewidth 80 to the scala test script run as a temp workaround

@kijuky
Copy link
Contributor Author

kijuky commented Aug 1, 2022

you could try adding -pagewidth 80 to the scala test script run as a temp workaround

I will try it!

@kijuky
Copy link
Contributor Author

kijuky commented Aug 6, 2022

you could try adding -pagewidth 80 to the scala test script run as a temp workaround

I tried adding this option, but it didn't help. Even if I change the settings or environment variables, tput will always be executed. As a last resort, I renamed tput only when running scala.

Doesn't seem like a very good way to do it, but I was out of ideas... 😢

@kijuky kijuky closed this Dec 3, 2022
@kijuky kijuky force-pushed the feature/add-amazon-corretto branch from 1c53138 to b75d204 Compare December 3, 2022 12:29
@kijuky kijuky reopened this Feb 12, 2023
@kijuky kijuky marked this pull request as draft February 12, 2023 02:28
@kijuky kijuky force-pushed the feature/add-amazon-corretto branch from c98e178 to 8c93d71 Compare March 7, 2023 23:34
@francisdb
Copy link
Collaborator

francisdb commented Jul 2, 2024

Updated to latest 21, 17

@fommil
Copy link

fommil commented Nov 14, 2024

adding amazoncorretto support will be much appreciated, thank you for your work here everybody.

@kijuky kijuky force-pushed the feature/add-amazon-corretto branch from 1ea3d06 to da80174 Compare November 14, 2024 12:43
@kijuky kijuky changed the title Add amazon-corretto base image (17, 11) Add amazon-corretto base image (21, 17) Nov 14, 2024
@kijuky
Copy link
Contributor Author

kijuky commented Nov 14, 2024

MEMO
https://github.com/sbt/docker-sbt/actions/runs/11837543635/job/32984746180?pr=207#step:8:798

#8 0.869 Exception in thread "main" java.lang.NumberFormatException: For input string: ""
#8 0.870 	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
#8 0.870 	at java.base/java.lang.Integer.parseInt(Integer.java:678)
#8 0.870 	at java.base/java.lang.Integer.parseInt(Integer.java:786)
#8 0.870 	at scala.collection.StringOps$.toInt$extension(StringOps.scala:910)
#8 0.870 	at dotty.tools.dotc.config.ScalaSettings$.defaultPageWidth(ScalaSettings.scala:46)
#8 0.870 	at dotty.tools.dotc.config.CommonScalaSettings.$init$(ScalaSettings.scala:112)
#8 0.870 	at dotty.tools.dotc.config.ScalaSettings.<init>(ScalaSettings.scala:18)
#8 0.870 	at dotty.tools.dotc.core.Contexts$ContextBase.<init>(Contexts.scala:865)
#8 0.870 	at dotty.tools.dotc.Driver.initCtx(Driver.scala:60)
#8 0.870 	at dotty.tools.scripting.ScriptingDriver.compileAndRun(ScriptingDriver.scala:17)
#8 0.870 	at dotty.tools.scripting.Main$.process(Main.scala:39)
#8 0.870 	at dotty.tools.MainGenericRunner$.run$1(MainGenericRunner.scala:250)
#8 0.870 	at dotty.tools.MainGenericRunner$.process(MainGenericRunner.scala:270)
#8 0.870 	at dotty.tools.MainGenericRunner$.main(MainGenericRunner.scala:281)
#8 0.870 	at dotty.tools.MainGenericRunner.main(MainGenericRunner.scala)

@kijuky kijuky force-pushed the feature/add-amazon-corretto branch from d8781da to 14bc3d9 Compare November 14, 2024 12:58
@francisdb
Copy link
Collaborator

francisdb commented Nov 14, 2024

Another workaround could be replacing export COLUMNS="$(tput -Tdumb cols)" with export COLUMNS=80 in /usr/share/scala/bin/common-shared

@kijuky
Copy link
Contributor Author

kijuky commented Nov 14, 2024

Changed to use al2023 instead of default al2.

https://docs.aws.amazon.com/linux/al2023/ug/compare-with-al2.html

The tput issue has been resolved, but there seems to be another issue.

@kijuky
Copy link
Contributor Author

kijuky commented Nov 14, 2024

https://github.com/sbt/docker-sbt/actions/runs/11838202219/job/32986821395?pr=207#step:8:1585

#8 6.260 Starting compilation server
#8 6.782 Error: Error running bloop-server-start-check (java.io.IOException: Cannot run program "ps": error=2, No such file or directory)

@francisdb
Copy link
Collaborator

Ah I have seen that before

@francisdb
Copy link
Collaborator

VirtusLab/scala-cli#3130

That's why the graalvm scala3 builds are excluded.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@kijuky kijuky force-pushed the feature/add-amazon-corretto branch from 73ae3b0 to f187aee Compare November 14, 2024 13:47
@francisdb francisdb marked this pull request as ready for review November 14, 2024 13:47
@francisdb
Copy link
Collaborator

@kijuky are we good to go if this builds without issues?

@kijuky
Copy link
Contributor Author

kijuky commented Nov 14, 2024

@francisdb

One thing I was concerned about was the naming of the Dockerfile.

Since alpine is named alpine.Dockerfile, is it better to use al2023.Dockerfile as well?

@francisdb
Copy link
Collaborator

For my part it can stay the way it is. It's up to you.

@francisdb francisdb merged commit 985c682 into sbt:master Nov 14, 2024
41 checks passed
@francisdb
Copy link
Collaborator

thanks @kijuky

@kijuky kijuky deleted the feature/add-amazon-corretto branch November 14, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants