reduce docker layer size

This commit is contained in:
Michael Schramm 2020-06-16 10:45:52 +02:00
parent 84f23706b5
commit 3f5104bee5
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -3,11 +3,22 @@ MAINTAINER OhMyForm <admin@ohmyform.com>
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 <admin@ohmyform.com>