You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. ## is a simple copy of postgis/postgis:10-3.0-alpine
  2. FROM docker.0k.io/postgis:10-3.0-alpine as common
  3. FROM common AS builder
  4. RUN apk -U add alpine-sdk curl
  5. RUN adduser -D packager && addgroup packager abuild
  6. ## Orig: https://git.alpinelinux.org/aports/plain/testing/mbuffer/APKBUILD?id=026cabf316eb477b2ae3e26dadc3e9c30ff26626
  7. ENV MBUFFER_APKBUILD_URL=https://docker.0k.io/downloads/mbuffer-alpine-APKBUILD
  8. USER packager
  9. RUN mkdir -p /tmp/build && \
  10. curl -L "${MBUFFER_APKBUILD_URL}" > /tmp/build/APKBUILD
  11. RUN cd /tmp/build && \
  12. sed -ri 's/^(\s+make -j1 check.*)/#\1/g' APKBUILD && \
  13. sed -ri 's%^source="http://www.maier-komor.de/software/mbuffer/mbuffer-\$pkgver.tgz"%source="https://docker.0k.io/downloads/mbuffer-$pkgver.tgz"%' APKBUILD && \
  14. abuild-keygen -a -i && \
  15. abuild -r
  16. USER root
  17. RUN apk add curl
  18. RUN curl -L https://raw.githubusercontent.com/0k/pgm/0.0.6/bin/pgm > /bin/pgm && \
  19. chmod +x /bin/pgm
  20. FROM common
  21. RUN apk -U add pv python2 file sed coreutils
  22. COPY --from=builder /home/packager/packages/tmp/x86_64/*.apk /tmp/
  23. COPY --from=builder /bin/pgm /bin
  24. RUN apk add /tmp/mbuffer-20*.apk --allow-untrusted
  25. RUN apk add gzip
  26. RUN ln -sf /usr/bin/mbuffer /usr/bin/buffer
  27. ##
  28. ## Install less capability
  29. ##
  30. RUN apk add less && \
  31. echo "\setenv PAGER 'less -SFX'" >> /var/lib/postgresql/.psqlrc