summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile22
-rw-r--r--cpanfile9
-rw-r--r--docker-run.sh5
3 files changed, 36 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5b93afd
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
+FROM debian:stretch-slim
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+COPY cpanfile /app/cpanfile
+WORKDIR /app
+
+RUN apt-get update && apt-get install --no-install-recommends -y \
+ cpanminus \
+ build-essential \
+ git \
+ liblwp-protocol-https-perl \
+ && cpanm -in --no-man-pages --installdeps . \
+ && rm -rf ~/.cpanm \
+ && apt-get purge -y \
+ build-essential \
+ cpanminus \
+ && apt-get autoremove -y
+
+COPY . /app
+
+CMD ["/app/docker-run.sh"]
diff --git a/cpanfile b/cpanfile
new file mode 100644
index 0000000..929fa4d
--- /dev/null
+++ b/cpanfile
@@ -0,0 +1,9 @@
+requires 'Cache';
+requires 'DateTime';
+requires 'DateTime::Format::Strptime';
+requires 'File::Slurp';
+requires 'Mojolicious';
+requires 'Travel::Status::DE::DBWagenreihung';
+requires 'Travel::Status::DE::DeutscheBahn';
+requires 'Travel::Status::DE::IRIS';
+requires 'XML::LibXML';
diff --git a/docker-run.sh b/docker-run.sh
new file mode 100644
index 0000000..542f1de
--- /dev/null
+++ b/docker-run.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -eu
+
+exec /usr/local/bin/hypnotoad -f index.pl