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

Upgrade to 3.10.6-slim-bullseye Docker base image #1768

Closed
simonw opened this issue Jul 6, 2022 · 5 comments
Closed

Upgrade to 3.10.6-slim-bullseye Docker base image #1768

simonw opened this issue Jul 6, 2022 · 5 comments
Labels
docker The official Docker image, plus other things related to running Datasette on Docker

Comments

@simonw
Copy link
Owner

simonw commented Jul 6, 2022

For the package published to Docker Hub and also the containers used by datasette package and datasette publish cloudrun.

@simonw simonw added the docker The official Docker image, plus other things related to running Datasette on Docker label Jul 6, 2022
@simonw
Copy link
Owner Author

simonw commented Jul 6, 2022

Relevant Twitter thread: https://twitter.com/simonw/status/1544710944462254080

Looks like python:3.10-slim-bullseye is a good option, see https://pythonspeed.com/articles/base-image-python-docker-images/

@simonw
Copy link
Owner Author

simonw commented Jul 7, 2022

I tried this on Datasette Cloud and swapping datasetteproject/datasette to python:3.10-slim-bullseye as the base image dropped the overall image size from ~232MB to ~166MB - but note that I don't have SpatiaLite in that second image.

@simonw simonw added this to the Datasette 0.62 milestone Aug 14, 2022
@simonw
Copy link
Owner Author

simonw commented Aug 14, 2022

Tested locally with:

datasette package fixtures.db --extra-options="--setting sql_time_limit_ms 2500" \
  -t datasette-package-python-upgrade

And then:

docker run -p 8081:8001 datasette-package-python-upgrade
INFO:     Started server process [8]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)

image

@simonw
Copy link
Owner Author

simonw commented Aug 14, 2022

Also trying this locally:

datasette publish cloudrun fixtures.db --service issue-1768

https://issue-1768-j7hipcg4aq-uc.a.run.app/-/versions

image

@simonw simonw closed this as completed Aug 14, 2022
@simonw simonw changed the title Switch to more recent, smaller Docker image Upgrade to 3.10.6-slim-bullseye Docker base image Aug 14, 2022
simonw added a commit that referenced this issue Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker The official Docker image, plus other things related to running Datasette on Docker
Projects
None yet
Development

No branches or pull requests

1 participant