How to exclude a default nixpack package from the build?
I'm trying to deploy a Spring Boot application which uses JDK11.
Railway incorrectly detected JDK8, causing the build to fail.
I added
NIXPACKS_PKGS=jdk11
, which added jdk11 to the build setup, but didn't remove jdk8
This means that the build is now failing due to this collision error:
How can I remove JDK8 from the build setup?
Or is there a better way of defining the JDK version?8 Replies
Project ID:
51267194-e20e-4c89-9270-89caaecaa531
You can remove JDK8 from the build setup by setting the
NIXPACKS_PKGS
environment variable to jdk11
instead of jdk
. This will ensure that only JDK11 is used in the build setup.⚠️ experimental feature
51267194-e20e-4c89-9270-89caaecaa531
push
@Angelo or anyone else?
Oh this is interesting, tagging in @coffeecup
You can now customize the JDK version that gets installed with the
NIXPACKS_JDK_VERSION
environment variable. In your case you can set it to 11
. This should override the automatically provided one and prevent any collisions https://nixpacks.com/docs/providers/javaJava | Nixpacks
App source + Nix packages + Docker = Image
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Enter the variable mentioned in jr’s message above in the environments variable tab in your service on Railway
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View