From fcaf57f6676bf33e2b334ec3e81df9d9f8cc8a27 Mon Sep 17 00:00:00 2001 From: Kadin Buckton Date: Thu, 10 Oct 2019 13:55:16 -0400 Subject: [PATCH] Added Dockerfile --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e32a5a3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM nimlang/nim:alpine as nim +MAINTAINER setenforce@protonmail.com +EXPOSE 8080 +ENV HOSTNAME nitter.net + +COPY . /src/nitter +WORKDIR /src/nitter + +RUN apk update \ + && apk add python3 python3-dev bash libsass libsass-dev chromium chromium-chromedriver libffi libffi-dev openssl-dev \ + && pip3 install --upgrade pip && pip3 install -U seleniumbase pytest \ + && nimble build -y -d:release -d:hostname=${HOSTNAME} \ + && nimble scss \ + && mkdir -p ./tmp \ + && bash -c "./nitter & cd tests && pytest --headless -n 8 --reruns 5 --reruns-delay 1 && kill %1" + +FROM alpine +WORKDIR /src/ +COPY --from=nim /src/nitter . +RUN apk add pcre-dev sqlite-dev +CMD ./nitter