Browse Source

chore: upgrade alpine version

- add missing node-gyp dependencies

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4280/head
mertmit 2 years ago
parent
commit
21c3b70a22
  1. 9
      packages/nocodb/Dockerfile

9
packages/nocodb/Dockerfile

@ -18,9 +18,12 @@ RUN cp $GOPATH/bin/litestream /usr/src/lt
########### ###########
# Builder # Builder
########### ###########
FROM node:12 as builder FROM node:16.17.0-alpine3.15 as builder
WORKDIR /usr/src/app WORKDIR /usr/src/app
# install node-gyp dependencies
RUN apk add --no-cache python3 make g++
# Copy application dependency manifests to the container image. # Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied. # A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm ci on every code change. # Copying this separately prevents re-running npm ci on every code change.
@ -32,7 +35,7 @@ COPY ./docker/start-litestream.sh /usr/src/appEntry/start.sh
# install production dependencies, # install production dependencies,
# reduce node_module size with modclean & removing sqlite deps, # reduce node_module size with modclean & removing sqlite deps,
# package built code into app.tar.gz & add execute permission to start.sh # package built code into app.tar.gz & add execute permission to start.sh
RUN npm ci --production --quiet \ RUN npm ci --omit=dev --quiet \
&& npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**" --run \ && npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**" --run \
&& rm -rf ./node_modules/sqlite3/deps \ && rm -rf ./node_modules/sqlite3/deps \
&& tar -czf ../appEntry/app.tar.gz ./* \ && tar -czf ../appEntry/app.tar.gz ./* \
@ -41,7 +44,7 @@ RUN npm ci --production --quiet \
########## ##########
# Runner # Runner
########## ##########
FROM alpine:3.12 FROM alpine:3.15
WORKDIR /usr/src/app WORKDIR /usr/src/app
ENV NC_DOCKER 0.6 ENV NC_DOCKER 0.6

Loading…
Cancel
Save