11# Stage 1: Build the Vue.js application
2- FROM node:14 AS build-stage
2+ FROM node:23 AS build-stage
33
44USER node
55WORKDIR /app
66
77COPY --chown=1000:1000 package*.json ./
88RUN npm install
99COPY --chown=1000:1000 . .
10- # this will tokenize the app
1110RUN npm run build
1211
1312# Stage 2: Prepare the Node.js API
14- FROM node:14 AS api-stage
13+ FROM node:23 AS api-stage
14+
1515WORKDIR /api
16+
1617# Copy package.json and other necessary files for the API
1718COPY --chown=1000:1000 api/package*.json ./
18- RUN npm install \
19- && chown -R 1000:1000 /api
19+ RUN npm install && \
20+ chown -R 1000:1000 /api && \
21+ apt-get update && \
22+ apt-get install -y --no-install-recommends gettext-base && \
23+ apt-get clean && \
24+ rm -rf /var/lib/apt/lists/*
2025
2126# Copy the rest of your API source code
2227COPY --chown=1000:1000 api/ .
@@ -25,14 +30,11 @@ COPY --chown=1000:1000 api/ .
2530COPY --chown=1000:1000 --from=build-stage /app/dist /api/public
2631COPY --chown=1000:1000 --from=build-stage /app/dist/assets/app-config.js /api/app-config.template.js
2732
28- # install gettext-base for envsubst
29- RUN apt-get update && apt-get install -y gettext-base
30-
3133# Expose the port your API will run on
3234EXPOSE 3000
3335
3436# Command to run your API (and serve your Vue.js app)
3537RUN chmod +x /api/docker-entrypoint.api/entrypoint.sh
3638
3739USER node
38- ENTRYPOINT ["/api/docker-entrypoint.api/entrypoint.sh" ]
40+ ENTRYPOINT ["/api/docker-entrypoint.api/entrypoint.sh" ]
0 commit comments