redocly-cli
redocly-cli copied to clipboard
Docker image size growth (investigation)
Investigate the cause:
Image size has jumped from 132 MB to 361 MB since changing to FROM redocly/openapi-cli:v1.0.0-beta.75
The smaller image size was using:
FROM node:16.13.1-alpine3.14
RUN apk update && \
apk add bash jq && \
rm -rf /var/cache/apk
RUN npm install -g --update-notifier=false @redocly/[email protected]
...
This issue was reported due to the increase in my image size from 132 MB TO 361 MG after changing to FROM redocly/openapi-cli:v1.0.0-beta.75. I don't have a history on the uncompressed image size of redocly/openapi-cli itself.
# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ab_redocly latest ee2a92c66851 4 days ago 364MB
redocly/openapi-cli latest aa4698b5a5c8 5 days ago 361MB
<none> <none> a26001519df7 5 days ago 135MB
<none> represents my final build of ab_redocly that was based on node:16.13.1-alpine3.14.
I believe we need to use a multi-stage build for our docker image.
The size is now reporting as 501MB so definitely needs looking at.