2022-10-25 18:59:03 +00:00
|
|
|
FROM python:3.11.0-slim-bullseye as build
|
2021-03-27 04:27:40 +00:00
|
|
|
|
|
|
|
# Version of Datasette to install, e.g. 0.55
|
|
|
|
# docker build . -t datasette --build-arg VERSION=0.55
|
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
2021-10-24 23:24:41 +00:00
|
|
|
apt-get install -y --no-install-recommends libsqlite3-mod-spatialite && \
|
2021-03-27 04:27:40 +00:00
|
|
|
apt clean && \
|
|
|
|
rm -rf /var/lib/apt && \
|
2021-05-24 18:07:03 +00:00
|
|
|
rm -rf /var/lib/dpkg/info/*
|
2021-03-27 04:27:40 +00:00
|
|
|
|
|
|
|
RUN pip install https://github.com/simonw/datasette/archive/refs/tags/${VERSION}.zip && \
|
|
|
|
find /usr/local/lib -name '__pycache__' | xargs rm -r && \
|
|
|
|
rm -rf /root/.cache/pip
|
2018-05-23 17:43:34 +00:00
|
|
|
|
2017-11-15 03:08:04 +00:00
|
|
|
EXPOSE 8001
|
|
|
|
CMD ["datasette"]
|