Dockerfile: use nodejs 18 for build
workaround to get nodejs 20 working on older arm architectures
This commit is contained in:
parent
3032163814
commit
c8224f34f9
|
@ -1,9 +1,11 @@
|
||||||
FROM docker.io/library/node:20-alpine AS build_node_modules
|
FROM docker.io/library/node:18-alpine AS build_node_modules
|
||||||
|
|
||||||
# Copy Web UI
|
# Copy Web UI
|
||||||
COPY src/ /app/
|
COPY src/ /app/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm ci --omit=dev &&\
|
RUN npm ci --omit=dev &&\
|
||||||
|
# Enable this to run `npm run serve`
|
||||||
|
npm i -g nodemon &&\
|
||||||
mv node_modules /node_modules
|
mv node_modules /node_modules
|
||||||
|
|
||||||
# Copy build result to a new image.
|
# Copy build result to a new image.
|
||||||
|
@ -20,11 +22,8 @@ COPY --from=build_node_modules /app /app
|
||||||
# than what runs inside of docker.
|
# than what runs inside of docker.
|
||||||
COPY --from=build_node_modules /node_modules /node_modules
|
COPY --from=build_node_modules /node_modules /node_modules
|
||||||
|
|
||||||
RUN \
|
|
||||||
# Enable this to run `npm run serve`
|
|
||||||
npm i -g nodemon &&\
|
|
||||||
# Delete unnecessary files
|
# Delete unnecessary files
|
||||||
npm cache clean --force && rm -rf ~/.npm
|
RUN npm cache clean --force && rm -rf ~/.npm
|
||||||
|
|
||||||
# Install Linux packages
|
# Install Linux packages
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
|
Loading…
Reference in New Issue