Skip to content
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

Docker image tweaks #230

Closed
wants to merge 2 commits into from
Closed

Docker image tweaks #230

wants to merge 2 commits into from

Conversation

mjurbanski-reef
Copy link

No description provided.

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~170kB; but perhaps more imortant it looked weird to just have that tar left in there

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~170kB; but perhaps more imortant it looked weird to just have that tar left in there

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~170kB; but perhaps more imortant it looked weird to just have that tar left in there

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~170kB; but perhaps more imortant it looked weird to just have that tar left in there

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~170kB; but perhaps more imortant it looked weird to just have that tar left in there

@@ -11,8 +11,8 @@ LABEL build-date-iso8601="${build_date}"

WORKDIR /root

COPY ${tar_path}/${tar_name} .
RUN ["pip", "install", "${tar_name}[full]"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--no-cache-dir saves ~6MB

@@ -1,4 +1,4 @@
FROM python:${python_version}-slim as base
FROM python:${python_version}-alpine as base
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suprisingly enough, alpine switch "just works"; seems all binary dependencies do have musl wheel

@@ -1,4 +1,4 @@
FROM python:${python_version}-slim as base
FROM python:${python_version}-alpine as base
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suprisingly enough, alpine switch "just works"; seems all binary dependencies do have musl wheel

@@ -1,4 +1,4 @@
FROM python:${python_version}-slim as base
FROM python:${python_version}-alpine as base
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using builder stage did not help save any disk space and was troublesome to get working - you have to be really careful what you want to copy, which makes Dockerfile significantly more complex.

We probably could do our custom python-base imagine, but I don't see that paying off as we don't even know how many MBs we can save that way.
If we ever start using standalone binary in these images instead, we are likely to see better results than optimizing python install.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but the builder stage wasn't there when you started working on the thing, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was no builder stage

@mjurbanski-reef
Copy link
Author

closed as alpine may degrade performance (unconfirmed)

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.

2 participants