diff --git a/gdf.js b/gdf.js index 1b97fc8..7f6ab06 100755 --- a/gdf.js +++ b/gdf.js @@ -157,7 +157,8 @@ export class GDF { // Does this application use puppeteer? get puppeteer() { - return !!this.#pj.dependencies?.puppeteer + return !!this.#pj.dependencies?.puppeteer || + !!this.#pj.dependencies?.['puppeteer-core'] } // Packages needed for base stage @@ -379,7 +380,7 @@ export class GDF { if (this.entrypoint) return false const version = parseInt(this.nodeVersion) - return (version >= 16) && ((version & 1) === 0) + return (version >= 16) } // List of package files needed to install diff --git a/templates/Dockerfile.ejs b/templates/Dockerfile.ejs index 9d8967a..f302256 100644 --- a/templates/Dockerfile.ejs +++ b/templates/Dockerfile.ejs @@ -6,7 +6,7 @@ ARG BUN_VERSION=<%= bunVersion %> FROM oven/bun:${BUN_VERSION} as base <% } else { -%> # Adjust NODE_VERSION as desired -ARG NODE_VERSION=<%= distroless ? parseInt(nodeVersion) : nodeVersion %> +ARG NODE_VERSION=<%= distroless ? (parseInt(nodeVersion) & ~1) : nodeVersion %> FROM node:${NODE_VERSION}-slim as <% if (distroless) { -%>build<% } else { %>base<% } %> <% } -%>