Skip to content

tobiko-app image size reduced from 3GB to 1.3GB#2589

Closed
singulart wants to merge 1 commit intoSQLMesh:mainfrom
singulart:app-image-size
Closed

tobiko-app image size reduced from 3GB to 1.3GB#2589
singulart wants to merge 1 commit intoSQLMesh:mainfrom
singulart:app-image-size

Conversation

@singulart
Copy link
Copy Markdown

Hey, Team! Came across your repository and thought I could help in optimizing the Docker image size.

Comment thread Dockerfile.api
RUN pip3 install -e .[dev,web]

RUN pip install -e .[dev,web]
FROM python:3.11-slim-bullseye as app-image
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are you referencing python 3.11 both times? can you explain a bit about what this pr is doing?

Copy link
Copy Markdown
Author

@singulart singulart May 9, 2024

Choose a reason for hiding this comment

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

The Dockerfile was updated the following way:

  1. The "slimmer" base image python:3.11-slim-bullseye was used.
  2. Multi-stage build approach was used: https://docs.docker.com/build/building/multi-stage

The 2) is why the image is being referenced twice. Hope that helps! Let me know if you need more clarity on this ;)

@izeigerman izeigerman requested a review from vchan May 9, 2024 16:47
@tobymao
Copy link
Copy Markdown
Contributor

tobymao commented May 9, 2024

@singulart thanks for the PR. since this docker image is used for development and never shipped to the user, I don't think we need to add complexity to reduce the size of the image.

so for now i'm going to close this pr.

@tobymao tobymao closed this May 9, 2024
@singulart
Copy link
Copy Markdown
Author

@singulart thanks for the PR. since this docker image is used for development and never shipped to the user, I don't think we need to add complexity to reduce the size of the image.

so for now i'm going to close this pr.

Sure @tobymao! Should the Docker image size become an issue going forward, you know how to solve it. Good luck!

@tobymao
Copy link
Copy Markdown
Contributor

tobymao commented May 9, 2024

thanks so much

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