2022-11-27 12:49:50 +01:00
|
|
|
FROM nimlang/nim:1.6.10-alpine-regular as nim
|
2020-10-01 05:41:47 +02:00
|
|
|
LABEL maintainer="setenforce@protonmail.com"
|
2019-10-10 19:55:16 +02:00
|
|
|
|
2022-01-09 23:14:01 +01:00
|
|
|
RUN apk --no-cache add libsass-dev pcre
|
2020-11-07 11:28:54 +01:00
|
|
|
|
2019-10-10 19:55:16 +02:00
|
|
|
WORKDIR /src/nitter
|
|
|
|
|
2022-01-27 05:50:29 +01:00
|
|
|
COPY nitter.nimble .
|
2022-01-30 17:29:19 +01:00
|
|
|
RUN nimble install -y --depsOnly
|
2022-01-27 05:50:29 +01:00
|
|
|
|
|
|
|
COPY . .
|
2022-01-30 17:29:19 +01:00
|
|
|
RUN nimble build -d:danger -d:lto -d:strip \
|
2022-01-09 23:14:01 +01:00
|
|
|
&& nimble scss \
|
|
|
|
&& nimble md
|
2019-10-10 19:55:16 +02:00
|
|
|
|
2020-10-01 05:41:47 +02:00
|
|
|
FROM alpine:latest
|
2019-10-10 19:55:16 +02:00
|
|
|
WORKDIR /src/
|
2022-04-02 02:54:58 +02:00
|
|
|
RUN apk --no-cache add pcre ca-certificates
|
2021-12-27 03:21:46 +01:00
|
|
|
COPY --from=nim /src/nitter/nitter ./
|
|
|
|
COPY --from=nim /src/nitter/nitter.example.conf ./nitter.conf
|
2019-10-21 06:17:08 +02:00
|
|
|
COPY --from=nim /src/nitter/public ./public
|
2022-04-02 01:37:02 +02:00
|
|
|
EXPOSE 8080
|
2023-03-28 15:18:16 +02:00
|
|
|
RUN adduser -h /src/ -D -s /bin/sh nitter
|
|
|
|
USER nitter
|
2020-10-01 05:41:47 +02:00
|
|
|
CMD ./nitter
|