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.

41 lines
1.1 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. ENV MBUFFER_APKBUILD_URL=https://git.alpinelinux.org/aports/plain/testing/mbuffer/APKBUILD?id=026cabf316eb477b2ae3e26dadc3e9c30ff26626
  7. USER packager
  8. RUN mkdir -p /tmp/build && \
  9. curl -L "${MBUFFER_APKBUILD_URL}" > /tmp/build/APKBUILD
  10. RUN cd /tmp/build && \
  11. sed -ri 's/^(\s+make -j1 check.*)/#\1/g' APKBUILD && \
  12. sed -ri 's%^source="http://www.maier-komor.de/software/mbuffer/mbuffer-\$pkgver.tgz"%source="https://docker.0k.io/downloads/mbuffer-$pkgver.tgz"%' APKBUILD && \
  13. abuild-keygen -a -i && \
  14. abuild -r
  15. USER root
  16. RUN apk add curl
  17. RUN curl -L https://raw.githubusercontent.com/0k/pgm/0.0.4/bin/pgm > /bin/pgm && \
  18. chmod +x /bin/pgm
  19. FROM common
  20. RUN apk -U add pv python2 file sed
  21. COPY --from=builder /home/packager/packages/tmp/x86_64/*.apk /tmp/
  22. COPY --from=builder /bin/pgm /bin
  23. RUN apk add /tmp/mbuffer-2018*.apk --allow-untrusted
  24. RUN apk add gzip
  25. RUN ln -sf /usr/bin/mbuffer /usr/bin/buffer