-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce docker image from 1.39 GB to 611 MB #341
Conversation
9560366
to
d418844
Compare
@@ -13,10 +13,12 @@ RUN apt update -y | |||
|
|||
RUN apt install --assume-yes nextcloud-desktop-cmd | |||
|
|||
RUN apt install ldap-utils | |||
RUN apt install -y ldap-utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was missing, this break build when updates are available
|
||
RUN apt update && apt -y dist-upgrade | ||
RUN apt install dirmngr | ||
RUN apt install -y gnupg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dirmngr should be replaced by gnupg: enough here and lighter
CMD ["npm", "run", "start"] | ||
#CMD ["npm", "run", "start"] | ||
|
||
FROM updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to copy the environment, since we're using @rollup/plugin-node-resolve
, nothing is useful except the generated JS itself
COPY --from=1 /usr/src/app/dist/* / | ||
RUN mv express_server.js express_server.mjs | ||
|
||
CMD ["node","express_server.mjs"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to have npm to run a single command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test one more time with modules, due to a problem we had yesterday with compiling ts and creating a bundle with a rollup
and thank you, Xavier!)
Just to reduce size