-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spatialite, switch to debian and local build (#114)
- Loading branch information
1 parent
b7c4165
commit 8b4c600
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
FROM python:3.6 as build | ||
FROM python:3.6-slim-stretch as build | ||
|
||
ARG VERSION=0.11 | ||
RUN pip install datasette==$VERSION | ||
# Setup build dependencies | ||
RUN apt update | ||
RUN apt install -y python-dev gcc libsqlite3-mod-spatialite | ||
# Add local code to the image instead of fetching from pypi. | ||
ADD . /datasette | ||
|
||
FROM python:3.6-slim | ||
RUN pip install /datasette | ||
|
||
FROM python:3.6-slim-stretch | ||
|
||
# Copy python dependencies | ||
COPY --from=build /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages | ||
# Copy executables | ||
COPY --from=build /usr/local/bin /usr/local/bin | ||
# Copy spatial extensions | ||
COPY --from=build /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu | ||
|
||
EXPOSE 8001 | ||
CMD ["datasette"] |