Skip to content

Build your personal knowledge base with Trilium Notes

docker: Cache system dependencies installation

Elian Doran9b88228be996
diff --git a/Dockerfile b/Dockerfile
index d8cb9b0c34..89bda67417 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,18 @@
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
FROM node:18.18.2-alpine
+# Configure system dependencies
+RUN apk add --no-cache --virtual .build-dependencies \
+ autoconf \
+ automake \
+ g++ \
+ gcc \
+ libtool \
+ make \
+ nasm \
+ libpng-dev \
+ python3
+
# Create app directory
WORKDIR /usr/src/app
@@ -11,16 +23,6 @@ COPY server-package.json package.json
# Install app dependencies
RUN set -x \
- && apk add --no-cache --virtual .build-dependencies \
- autoconf \
- automake \
- g++ \
- gcc \
- libtool \
- make \
- nasm \
- libpng-dev \
- python3 \
&& npm install \
&& apk del .build-dependencies \
&& npm run webpack \