mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Smaller Docker image by switching the base image to node:10.13.0-alpine and consolidating scripts
This commit is contained in:
parent
e37dd69827
commit
9cb9ea6ab5
26
Dockerfile
26
Dockerfile
@ -1,21 +1,27 @@
|
|||||||
FROM node:10.13.0
|
FROM node:10.13.0-alpine
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y nasm
|
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Install app dependencies
|
# Copy both package.json and package-lock.json
|
||||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
|
||||||
# where available (npm@5+)
|
# where available (npm@5+)
|
||||||
COPY package*.json ./
|
COPY package.json package-lock.json ./
|
||||||
|
|
||||||
RUN npm install --production
|
# Install app dependencies
|
||||||
# If you are building your code for production
|
RUN set -x \
|
||||||
# RUN npm install --only=production
|
&& apk add --no-cache --virtual .build-dependencies \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
libtool \
|
||||||
|
make \
|
||||||
|
nasm \
|
||||||
|
&& npm install --production \
|
||||||
|
&& apk del .build-dependencies
|
||||||
|
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD [ "node", "src/www" ]
|
CMD [ "node", "./src/www" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user