2025-01-21 04:58:44 +03:00
|
|
|
FROM nimlang/nim:2.0.0-alpine-regular as build
|
2019-10-10 13:55:16 -04:00
|
|
|
|
2022-01-09 23:14:01 +01:00
|
|
|
RUN apk --no-cache add libsass-dev pcre
|
2020-11-07 18:28:54 +08:00
|
|
|
|
2025-01-21 04:58:44 +03:00
|
|
|
WORKDIR /src
|
2019-10-10 13:55:16 -04:00
|
|
|
|
2022-01-26 23:50:29 -05:00
|
|
|
COPY nitter.nimble .
|
2022-01-30 17:29:19 +01:00
|
|
|
RUN nimble install -y --depsOnly
|
2022-01-26 23:50:29 -05:00
|
|
|
|
|
|
|
COPY . .
|
2025-01-21 04:58:44 +03:00
|
|
|
RUN nimble build -d:danger -d:lto -d:strip
|
|
|
|
RUN nimble scss
|
2019-10-10 13:55:16 -04:00
|
|
|
|
2025-01-21 05:26:35 +03:00
|
|
|
FROM debian:unstable-slim
|
2025-01-21 04:58:44 +03:00
|
|
|
|
2025-01-21 05:31:38 +03:00
|
|
|
RUN apt update
|
|
|
|
RUN apt install -y pcre ca-certificates
|
2025-01-21 04:58:44 +03:00
|
|
|
RUN useradd -d /src -u 1001 nitter
|
|
|
|
|
|
|
|
WORKDIR /srv
|
|
|
|
|
2025-01-21 05:26:35 +03:00
|
|
|
COPY --from=build /src/nitter ./
|
|
|
|
COPY --from=build /src/public ./public
|
2025-01-21 04:58:44 +03:00
|
|
|
|
2023-03-28 15:18:16 +02:00
|
|
|
USER nitter
|
2020-10-01 03:41:47 +00:00
|
|
|
CMD ./nitter
|