Skip to content

Commit

Permalink
support puppeer-core too
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Nov 25, 2023
1 parent 300e332 commit 4156013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions gdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/Dockerfile.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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<% } %>
<% } -%>

Expand Down

0 comments on commit 4156013

Please sign in to comment.