-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Dockerfile: use Ubuntu 20.10 as base #1296
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1296 +/- ##
==========================================
- Coverage 91.62% 91.51% -0.12%
==========================================
Files 34 34
Lines 4371 4255 -116
==========================================
- Hits 4005 3894 -111
+ Misses 366 361 -5
Continue to review full report at Codecov.
|
this PR helps me as removing the /var/lib/apt and /var/lib/dpkg directories breaks my ability to add packages when using Shorterm workaround for me was to use this in my Dockerfile
|
I have also found that ubuntu has fewer vulnerabilities than the buster based images.
|
That's a huge surprise to me! And most welcome. |
Removing /var/lib/apt and /var/lib/dpkg makes apt and dpkg unusable in images based on this one. Running `apt-get clean` and removing /var/lib/apt/lists achieves similar size savings.
The previous Dockerfile uses python:3.9.2-slim-buster (based on Debian stable), but installs Spatialite from the Debian unstable repositories. This has the side effect of also installing updates to libc and libstdc++6 from unstable, resulting in an untested combination (and, potentially, package versions that depend on the day when the Docker image was built). Moreover, the SQLite version in Debian stable doesn't support generated columns, so some DBs cannot be loaded by Datasette. Switching to ubuntu:20.10 fixes these issues.
527a056
to
8f00c31
Compare
This PR changes the main Dockerfile to use ubuntu:20.10 as base image instead of python:3.9.2-slim-buster (itself based on debian:buster-slim).
The Dockerfile is essentially the one from #1249 (comment) with some additional cleanups to slim it down.
This fixes a couple of issues:
As a bonus, the Docker image becomes smaller:
Reproduction of the first issue
Here is the SQLite version:
Reproduction of the second issue
Both libc and libstdc++ are backwards compatible, so the image still works, but it will result in a combination of libraries and Python versions that exists only in the Datasette image, so it's likely untested. In addition, since Debian sid is an always-changing rolling-release, the versions of libc, libstdc++, Spatialite, and their dependencies change frequently, so the library versions in the Datasette image will depend on the day when it was built.