1
0
mirror of https://github.com/zedeus/nitter synced 2024-11-24 10:49:27 +01:00

Add nonroot user to arm dockerfile

This commit is contained in:
Jasper 2023-06-07 17:22:48 -07:00
parent 38985af6ed
commit e5f4c486b5
2 changed files with 8 additions and 6 deletions

View File

@ -15,11 +15,11 @@ RUN nimble build -d:danger -d:lto -d:strip \
FROM alpine:latest
WORKDIR /src/
RUN apk --no-cache add pcre ca-certificates
RUN apk --no-cache add pcre ca-certificates && \
adduser -h /src/ -D -s /bin/sh nitter
COPY --from=nim /src/nitter/nitter ./
COPY --from=nim /src/nitter/nitter.example.conf ./nitter.conf
COPY --from=nim --chown=nitter:nitter /src/nitter/nitter.example.conf ./nitter.conf
COPY --from=nim /src/nitter/public ./public
EXPOSE 8080
RUN adduser -h /src/ -D -s /bin/sh nitter
USER nitter
CMD ./nitter
CMD ./nitter

View File

@ -15,9 +15,11 @@ RUN nimble build -d:danger -d:lto -d:strip \
FROM alpine:3.17
WORKDIR /src/
RUN apk --no-cache add ca-certificates pcre openssl1.1-compat
RUN apk --no-cache add ca-certificates pcre openssl1.1-compat && \
adduser -h /src/ -D -s /bin/sh nitter
COPY --from=nim /src/nitter/nitter ./
COPY --from=nim /src/nitter/nitter.example.conf ./nitter.conf
COPY --from=nim --chown=nitter:nitter /src/nitter/nitter.example.conf ./nitter.conf
COPY --from=nim /src/nitter/public ./public
EXPOSE 8080
USER nitter
CMD ./nitter