diff --git a/CHANGELOG.md b/CHANGELOG.md index 398a290..958db1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added ### Changed + +- minify containers to reduce layer size + ### Fixed - do not show login note if it is not set diff --git a/Dockerfile b/Dockerfile index 7823814..2407e1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,22 @@ MAINTAINER OhMyForm WORKDIR /usr/src/app +RUN apk update && apk add curl bash && rm -rf /var/cache/apk/* + +# install node-prune (https://github.com/tj/node-prune) +RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin + COPY . ./ RUN yarn install --frozen-lock-file RUN yarn build +# remove development dependencies +RUN npm prune --production + +# run node prune +RUN /usr/local/bin/node-prune + FROM node:12-alpine MAINTAINER OhMyForm