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:
parent
38985af6ed
commit
e5f4c486b5
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user