-
Notifications
You must be signed in to change notification settings - Fork 705
Minimize docker image #2526
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
Minimize docker image #2526
Conversation
f7a9905 to
efdeeef
Compare
| /datasets/ | ||
|
|
||
| COPY docker/dev/find_fastest_resources.sh /usr/local/bin/ | ||
| RUN /bin/sh -c "source find_fastest_resources.sh && \ |
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.
Can we merge these two RUN command lines?
|
|
||
| sleep infinity | ||
|
|
||
| # c.f. https://stackoverflow.com/questions/2935183/bash-infinite-sleep-infinite-blocking for BusyBox |
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 voted answer is sleep infinity from the URL, can you please add more comment to explain why remove sleep infinity?
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.
To minimize the image size, we did not install the bash, so we can't use sleep infinity here.
wangkuiyi
left a comment
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.
Please feel free to merge this PR and file a new one to fix the comments.
| | cut -d '/' -f 2) | ||
| cur_speed=${cur_speed:-99999.9} | ||
| cur_speed=${cur_speed:-99999} | ||
| cur_speed=${cur_speed/.*/} |
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.
Need a comment here explaining this Bash syntax.
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.
Ok
|
|
||
| COPY docker/mysql/install-mysql-server.bash / | ||
| RUN /install-mysql-server.bash | ||
| FROM alpine:3.12 |
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.
Need a comment here to note how much space does this change save.
Fixes sql-machine-learning/playground#43
Try to use alpine base image and move init code to start.sh, image size optimized from 480M to 211M