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 07:07:53 +03:00
|
|
|
FROM alpine:latest
|
2025-01-21 04:58:44 +03:00
|
|
|
|
2025-01-21 07:07:53 +03:00
|
|
|
RUN apk --no-cache add pcre ca-certificates
|
2025-01-21 04:58:44 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
2025-01-21 07:07:53 +03:00
|
|
|
RUN adduser -h /srv -D -s /bin/sh -u 1001 runner
|
|
|
|
RUN chown runner:runner -R /srv
|
2025-01-21 06:32:52 +03:00
|
|
|
|
2025-01-21 07:07:53 +03:00
|
|
|
USER runner
|
2025-01-21 06:53:53 +03:00
|
|
|
CMD ./nitter
|