Skip to content

Conversation

@lhw362950217
Copy link
Collaborator

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

@lhw362950217 lhw362950217 force-pushed the minimize_docker_image branch from f7a9905 to efdeeef Compare June 23, 2020 16:03
@lhw362950217 lhw362950217 requested a review from Yancey0623 June 24, 2020 09:13
/datasets/

COPY docker/dev/find_fastest_resources.sh /usr/local/bin/
RUN /bin/sh -c "source find_fastest_resources.sh && \
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@wangkuiyi wangkuiyi left a 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/.*/}
Copy link
Collaborator

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.

Copy link
Collaborator Author

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce OVA file size

3 participants