add Dockerfile for easier build

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:50 +03:00 committed by Motiejus Jakštys
parent cc477fb908
commit c1b2134575
2 changed files with 23 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM debian:bullseye
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
texlive-full poppler-utils \
osm2pgsql postgresql-client \
python3-pygments python3-geopandas \
latexmk make \
docker.io

14
in-container Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
NAME=wm-mj-build
if [[ -z "$(docker images -q --filter "reference=$NAME")" ]]; then
docker build -t "$NAME" - < Dockerfile
fi
exec docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${PWD}:/x \
-w /x \
"$NAME" "$@"