honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proposal: Multiple docker images per Node.js version

KentarouTakeda opened this issue · comments

Thanks for the great tool! I am grateful for the wide range of development, not only tools but also ecosystems such as plugins and ready-to-run docker images!

By the way, the current docker image only works with Node.js version 12. Adding support for other versions would be more useful. Since HonKit recommends using the Node.js LTS version, the Docker Image should also match it.

But it's also important to provide compatibility for older users, including those from GitBook. Therefore, by providing a combination of multiple OSs and versions as a tag, it is possible to provide a new environment while maintaining compatibility.

NOTE: Example of tagging in node images

Tag name Description
18-bullseye Specify both version and OS
18 Specify only the version (OS bullseye is selected as the recommended environment)
bullseye Specify OS only (version 18, which is the latest version, is selected)

If we provide multiple Docker Images with similar rules, for example, the following tags will be prepared.

Tag name Description
vX.Y.Z-nodeN Specify both Honkit and Node.js versions
nodeN Only Node.js version is specified and HonKit is the latest
vX.Y.Z Specify only HonKit version and Node.js gets our recommended version
latest Get the latest HonKit with our recommended Node.js version

Consideration

We need to consider what to choose as the recommended Node.js version.

If we choose 12, the Docker Image provided by the latest tag remains unchanged. This should be selected if compatibility is important.

However, this version is no longer recommended by HonKit. If we were to choose the latest LTS version of Node.js, it should be 16 by now.

Motivation

Even if we provide additional Docker Images, it doesn't change much to use as is, but some users will get the following benefits.

  • Base image for using calibre that HonKit officially supports.
    • Especially installing old versions of caliber is a pain.
    • Plug-in users use honkit/honkit as a base image, and add their favorite fonts and plug-ins to it.
  • Above all, the performance improvement in 16 is wonderful.
commented

@KentarouTakeda Thanks for suggestion.

https://nodejs.org/en/about/releases/
Now, Node LTS are 14, 16. (Node 14 is Maintenance LTS)
Node 12 is EOL and Node 18 is not stable yet.

It is better that we should only support Active LTS.
It means that we use node:16 as base image.
This is because handling multiple versions makes maintenance difficult.

If you have motivation to use node:14 and node:18, please tell me.


I think we need to raise the base image to at least node 16.
It will be major release and honkit@4 image use node 16 and drop to support node 12.
It means that If user want to use node 12, the user need to use honkit@3 image.

@azu Thanks for your quick reply!

Personally, I don't feel motivated by 14. I thought it would be better to have a wide range, but the problem of maintainability is as you said.

18 is the upcoming lts, ​​so I thought I'd include it. I'm also developing a plugin on 18. However, it may not be good considering the confusion of users.

Shall we drop 14 and 18 and add the latest tag to 16?

commented

It is rare case that a plugin requiring Node.js 18(future version) features.
So, It is reasonable that we only support Node.js 16 in docker image.
(HonKit itself aim to support All LTS/future versions)

Thanks for your comment. Fixed supported versions and default version.

I am very happy to hear that 4 will be released. We might also need a v3 / v4 image tag. I can prepare it if there is an opportunity, so let me know when the development branch name is decided.

commented

We will do not maintain v3 branch. (maintain main branch only)
v4 will just includes node version updates and does not includes other breaking changes.
So almost users just update honkit.

commented

I've (very rough) added docker usage to README.
https://github.com/honkit/honkit#docker-support