Skip to content

Instantly share code, notes, and snippets.

@simonw
Created January 17, 2018 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonw/365294fb51765fb07bc99fe5eb7fee22 to your computer and use it in GitHub Desktop.
Save simonw/365294fb51765fb07bc99fe5eb7fee22 to your computer and use it in GitHub Desktop.
Dockerfile used by Datasette Publish
FROM python:3.6-slim-stretch
RUN apt update
RUN apt install -y python3-dev gcc
RUN pip install https://github.com/simonw/datasette/archive/master.zip
RUN pip install csvs-to-sqlite
ADD *.csv csvs/
RUN csvs-to-sqlite csvs/*.csv csv-data.db
ADD metadata.json metadata.json
RUN datasette inspect csv-data.db --inspect-file inspect-data.json
EXPOSE 8001
CMD ["datasette", "serve", "csv-data.db", "--host", "0.0.0.0", "--cors", "--port", "8001", "--inspect-file", "inspect-data.json", "-m", "metadata.json"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment