A while ago, i built a docker image for those wanting to run bitcoin core v27.1 with the testnet4 patch (which now has been merged into v28.0rc1). For fun, i also compiled the last couple of "actual" releases.
I basically got obsessed with how far back i could go, so i got to the v26.x, then v25.x... And a couple of days later, i was knee-deep into v0.9.x,...
Then, i realised a lot of people actually asked questions about old versions... Either because they had an old wallet they needed to manipulate, because of curiosity, because they wanted to learn, because they wanted to see the size of those binary's, because they wanted to know when a certain feature was implemented (or deprecated).... So i started pushing the docker images to dockerhub.
At this moment, i'm up to version v0.2.1, the oldest version i have was released in November 2009.
For transparency, i added all Dockerfiles, bitcoin.conf's, patches, entrypoint.sh's in a git repo. Each branch is a version... So if you checkout the v26.0 branch, you'll see the dockerfile to build bitcoin core v26.0. If you pull the docker image with tag v26.0 from either dockerhub or ghcr.io, you'll get the docker image built by using the Dockerfile you can get from my git repo in branch v26.0.Around v21, the version scheme was altered... Pre v22.x versions, there was an extra "zero"... So instead of v21.0, they version scheme actually indicated this version as being v0.21.0. For simplicity's sake, i have omitted this... v0.21.0 was branched and tagged as v21.0 (same for all earlier versions aswell)
Now, for the url's:
DockerfilesYou can get the actual Dockerfiles (so you can build the images yourself) from my git repo:
https://github.com/mocacinno/bitcoin_core_docker/the repo has loads of branches, each branch contains the Dockerfiles for one specific version...
You can visit the branches directly like this:
https://github.com/mocacinno/bitcoin_core_docker/tree/v3.6 => for example, the Dockerfile to build v3.6 (v0.3.6 if you want to be completely correct).
Docker imageshttps://hub.docker.com/r/mocacinno/btc_core/tagsor
https://github.com/mocacinno/bitcoin_core_docker/pkgs/container/mocacinno%2Fbitcoin_core_docker/versions?filters%5Bversion_type%5D=taggedthe images hosted on github are built using a github action (which is also described right into the branches!!!), each time i push changes, a new image gets built and uploaded. You should be able to verify the process yourself if you want to... Just fork my repo and push any change, and the image should build in your very own namespace!!!
Documentationhttps://mocacinno.github.io/bitcoin_core_docker/Help mefor now, a lot of work is quick and dirty... Basically, i was working backwards from the most recent version (which is very easy to compile) all the way back to 2011 (and digging deeper as we speak). Each time a new problem popped up, i tought about the quickest way to fix the problem at hand... Sometimes it was by actually pulling the "good" dependency into my build process, or by downgrading gcc, but sometimes it was faster just to write a little patch, or quickly modify some lines in the sourcecode with sed... This way, i postponed "problems" untill later on. In time, i might go trough all the dockerfiles again, and try to fix the problems in the "right" way instead of using sed and patches... If you want to help in this process, just fork my repo, fix a certain branch and create a pull request
.
In time, i might seek some volunteers that i trust and give them access to my github project, or maybe even my dockerhub project, so they can help clean things up (or help with the documentation). For now, pull requests will do tough...
Help you + disclaimerMore recent versions should be OK to run (even in production), i compiled the actual sourcecode from bitcoin's github repo and put it in a very minimal container, so there should be hardly any vulnerability's. If you're not that technically inclined, it might even be safer to run the image i made vs trying to compile core yourself and run it on a full OS. This being said: if you're actually going to use this node for production (or to actually use the wallet functionality), i implore you to read the Dockerfile, sign off on what i did and build the image yourself. I'm a strong believer in the "don't trust, verify" motto!
If you run the image in production, don't forget to actually map the /root/.bitcoin container folder to a physical folder on your filesystem so you get a persistent setup!!!
Don't run older versions in production tough... I've actually played around with this stuff, and since v0.5.0, it looks like bitcoind actually starts syncing (early) blocks... However, it's a very, very, very bad idear to actually run these old versions!!! if you want to play around with them, i suggest you start the docker container with a "--network none" flag, so they are isolated. Old versions have vulnerability's... Using them, especially in production or by actually funding the wallet will probably end up with loss of your funds!!!
I will not take any responsability for loss of funds, even with new versions!!! Also, i do not commit myself to giving support... I compiled these versions, i did not write the sourcecode... I'm not a specialist on the features included (or removed from) these versions.... If you have a question, feel free to ask. If i know the answer, i'll answer you (but if i don't know the answer, you're on your own)