Skip to content

Commit

Permalink
try to update node
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardozgz committed Apr 17, 2024
1 parent d7845ef commit aad603f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
@@ -1,10 +1,10 @@
# Install necessary dependencies to install the app's dependencies
FROM node:16-alpine as base_dependencies
FROM node:18-alpine as base_dependencies
RUN apk add --no-cache make gcc g++ python3 git
RUN npm install -g pnpm

# Ignore the app's version to avoid an unnecessary dependency install
FROM node:16-alpine as version_cache_fix
FROM node:18-alpine as version_cache_fix
WORKDIR /cache
COPY package*.json ./
# '3d' is the 3rd line of package*.json
Expand All @@ -24,14 +24,14 @@ COPY --from=version_cache_fix /cache /cache
RUN pnpm prune --prod

# compile the app using the cached dev dependencies
FROM node:16-alpine as builder
FROM node:18-alpine as builder
WORKDIR /app
COPY . .
COPY --from=app_building_dependencies /cache/node_modules ./node_modules
RUN npm run build

# copy the cached dependencies, copy the compiled code and set entrypoint
FROM node:16-alpine as release
FROM node:18-alpine as release
WORKDIR /app
COPY package*.json ./
COPY --from=app_production_dependencies /cache/node_modules ./node_modules
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
@@ -1,4 +1,4 @@
FROM node:16-alpine as node_modules_cache
FROM node:18-alpine as node_modules_cache

WORKDIR /cache/
RUN apk add --no-cache make gcc g++ python3 git
Expand All @@ -7,7 +7,7 @@ RUN npm install -g pnpm
RUN pnpm install --strict-peer-dependencies=false


FROM node:16-alpine
FROM node:18-alpine

WORKDIR /app
RUN apk add --no-cache git
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "member-counter-bot",
"version": "0.0.0-dev",
"engines": {
"node": ">=16.0"
"node": ">=18.0"
},
"description": "",
"main": "./dist/src/index.js",
Expand Down

0 comments on commit aad603f

Please sign in to comment.