Dockerfile 648 B

1234567891011121314151617181920212223242526
  1. FROM alpine:3.10
  2. RUN adduser -S postsrsd \
  3. && apk add --no-cache postsrsd \
  4. && mkdir -p /etc/postsrsd/secrets \
  5. && chown postsrsd /etc/postsrsd/secrets
  6. USER postsrsd
  7. VOLUME /etc/postsrsd/secrets
  8. # https://github.com/roehling/postsrsd/blob/1.6/postsrsd.c#L342
  9. ENV SRS_DOMAIN change-me.tld
  10. ENV SRS_SECRET /etc/postsrsd/secrets/list
  11. # forward SRS lookup
  12. EXPOSE 10001/tcp
  13. # reverse SRS lookup
  14. EXPOSE 10002/tcp
  15. # > Cannot open file with secret: /etc/postsrsd/secrets/list
  16. CMD set -x; \
  17. if [ ! -f "$SRS_SECRET" ]; \
  18. then tr -dc '1-9a-zA-Z' < /dev/random | head -c 32 > "$SRS_SECRET"; \
  19. fi \
  20. && postsrsd -l0.0.0.0 -e