Closed viceice closed 1 year ago
I don't think it really matters much whether it's in /home/user
or /usr/local
however /usr/local
would probably be better for OpenShift, where the UID is random.
We like to implement a new
binarySource=install
where renovate install tools dynamically at runtime.Use-case is to have smaller docker image used in kubernets, which can download missing tools on demand.
ref #96
https://github.com/renovatebot/docker-buildpack/issues/144#issue-802657002
@viceice should we break these into separate issues to research and complete one by one? I'd like to know early if we have any "blockers", too
Thinking it through, we'll need:
apt
So in terms of research, it's a matter of working out which falls in (2) and which in (3).
Pre-built:
Dynamically-installable:
(let's update the above lists as we go)
@viceice any good way to build up a definitive list - everything here? https://github.com/containerbase/buildpack/tree/main/src/usr/local/buildpack/tools
No easy way beside to check every tool. I think most tools can be installed as runtime if we use a file download.
The morst rework is needed for erlang
and java
, as they are installed via apt
.
For java
i already have a solution in mind.
erlang
needs some research
Portable java seems possible via https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot
Edit: Seems they changed project name and now have binaries in GitHub releases: https://github.com/adoptium?q=binaries&type=source&language=&sort=
I think erlang is still pretty niche and I could live with it being unsupported for this for a while
Portable java seems possible via https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot
Edit: Seems they changed project name and now have binaries in GitHub releases: https://github.com/adoptium?q=binaries&type=source&language=&sort=
I know, Some issues about adopt / adoptium:
jdk-11.0.9+11
, jdk-11.0.9+11.1
, jdk-11.0.9.1+1
, jdk-11.0.10+9
, jdk-11.0.11+9
. JDK8 has a even more weired versioning schemeSo i'm thinking if we should add a adoptium-java
datasource and versioning to renovate, so we can directly use the binary releaes / adoptium api?
Maybe we should use the api at https://api.adoptium.net/ to get required version(s)
OK, if we use the api, we can use semver, at the api has a semver v2 field.
https://api.adoptopenjdk.net/v3/info/release_versions?architecture=x64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=linux&page=0&page_size=10&project=jdk&release_type=ga&sort_method=DEFAULT&sort_order=ASC&vendor=adoptopenjdk
{
"versions": [
{
"build": 13,
"major": 8,
"minor": 0,
"openjdk_version": "8u181-b13",
"security": 181,
"semver": "8.0.181+13"
},
{
"build": 12,
"major": 8,
"minor": 0,
"openjdk_version": "8u192-b12",
"security": 192,
"semver": "8.0.192+12"
},
{
"build": 8,
"major": 8,
"minor": 0,
"openjdk_version": "8u202-b08",
"security": 202,
"semver": "8.0.202+8"
},
{
"build": 3,
"major": 8,
"minor": 0,
"openjdk_version": "8u212-b03",
"security": 212,
"semver": "8.0.212+3"
},
{
"build": 4,
"major": 8,
"minor": 0,
"openjdk_version": "8u212-b04",
"security": 212,
"semver": "8.0.212+4"
},
{
"adopt_build_number": 1,
"build": 10,
"major": 8,
"minor": 0,
"openjdk_version": "1.8.0_222-b10",
"security": 222,
"semver": "8.0.222+10.1"
},
{
"adopt_build_number": 1,
"build": 9,
"major": 8,
"minor": 0,
"openjdk_version": "1.8.0_232-b09",
"security": 232,
"semver": "8.0.232+9.1"
},
{
"adopt_build_number": 1,
"build": 8,
"major": 8,
"minor": 0,
"openjdk_version": "1.8.0_242-b08",
"security": 242,
"semver": "8.0.242+8.1"
},
{
"adopt_build_number": 1,
"build": 9,
"major": 8,
"minor": 0,
"openjdk_version": "1.8.0_252-b09",
"security": 252,
"semver": "8.0.252+9.1"
},
{
"build": 10,
"major": 8,
"minor": 0,
"openjdk_version": "1.8.0_262-b10",
"security": 262,
"semver": "8.0.262+10"
}
]
}
{
"versions": [
{
"build": 28,
"major": 11,
"minor": 0,
"openjdk_version": "11+28",
"security": 0,
"semver": "11.0.0+28"
},
{
"build": 13,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.1+13",
"security": 1,
"semver": "11.0.1+13"
},
{
"build": 7,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.2+7",
"security": 2,
"semver": "11.0.2+7"
},
{
"build": 9,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.2+9",
"security": 2,
"semver": "11.0.2+9"
},
{
"build": 7,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.3+7",
"security": 3,
"semver": "11.0.3+7"
},
{
"adopt_build_number": 1,
"build": 11,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.4+11",
"security": 4,
"semver": "11.0.4+11.1"
},
{
"adopt_build_number": 1,
"build": 10,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.5+10",
"security": 5,
"semver": "11.0.5+10.1"
},
{
"adopt_build_number": 1,
"build": 10,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.6+10",
"security": 6,
"semver": "11.0.6+10.1"
},
{
"adopt_build_number": 1,
"build": 10,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.7+10",
"security": 7,
"semver": "11.0.7+10.1"
},
{
"build": 10,
"major": 11,
"minor": 0,
"openjdk_version": "11.0.8+10",
"security": 8,
"semver": "11.0.8+10"
}
]
}
sometimes we need to filter duplicates, eg: 11.0.2+7
and 11.0.2+9
Here's now I'd like to approach this:
All tools are now runtime installable. Only git is left. Not possible yet. Will open a new issue for that
Make all possible tools runtime installable.
TODO
bundler
#251cocoapods
#251composer
docker
#651elixir
#376git-lfs
#652gradle
hashin
(pip_requirements
) #639java
nix
#573npm
pipenv
#639pip-tools
(pip-compile
) #639pnpm
poetry
sbt
scala
yarn