Node v18 is currently not supported by Ubuntu 18.04. Please refer to this issue for more details.
GitHub Repository
Gatsby JS Project (with Node v18 on Ubuntu 18.04)
Tutorial
Install the Gatsby CLI
Install the Gatsby CLI with the following command in your terminal.Start a Gatsby Project
After you’ve installed the Gatsby CLI, use the following command in a directory of your choice to start a gatsby project.Add a Dockerfile
Once you’ve created the Gatsby JS project, add the following Dockerfile to the base of the project:Dockerfile
Add a Layerfile
Once you’ve added the Dockerfile, add the following Layerfile to the base of the project:Layerfile