mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-20 16:20:16 +00:00
Link sqlite with a system sqlite for quicker builds
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
11
Dockerfile
11
Dockerfile
@ -30,7 +30,9 @@ RUN apk add --no-cache \
|
|||||||
binutils \
|
binutils \
|
||||||
libgcc \
|
libgcc \
|
||||||
libstdc++ \
|
libstdc++ \
|
||||||
libuv
|
libuv \
|
||||||
|
sqlite-libs \
|
||||||
|
sqlite-dev
|
||||||
|
|
||||||
COPY build-conf/node-sums.txt .
|
COPY build-conf/node-sums.txt .
|
||||||
|
|
||||||
@ -43,7 +45,7 @@ RUN curl -SLO "${NODE_LOCATION}" \
|
|||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
RUN npm ci
|
RUN npm ci --build-from-source --sqlite=/usr/lib
|
||||||
|
|
||||||
# TODO: Once we support live copies and live runs, convert
|
# TODO: Once we support live copies and live runs, convert
|
||||||
# these
|
# these
|
||||||
@ -62,7 +64,7 @@ RUN npm run test-nolint \
|
|||||||
|
|
||||||
# Run the production install here, to avoid the npm dependency on
|
# Run the production install here, to avoid the npm dependency on
|
||||||
# the later stage
|
# the later stage
|
||||||
RUN npm ci --production --no-optional --unsafe-perm \
|
RUN npm ci --production --no-optional --unsafe-perm --build-from-source --sqlite=/usr/lib \
|
||||||
&& npm cache clean --force \
|
&& npm cache clean --force \
|
||||||
# For some reason this doesn't get cleared with the other
|
# For some reason this doesn't get cleared with the other
|
||||||
# cache
|
# cache
|
||||||
@ -95,7 +97,8 @@ RUN apk add --no-cache \
|
|||||||
rsync \
|
rsync \
|
||||||
avahi \
|
avahi \
|
||||||
dbus \
|
dbus \
|
||||||
libstdc++
|
libstdc++ \
|
||||||
|
sqlite-libs
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user