fork 0k-charms
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.

39 lines
941 B

  1. ## is a simple copy of postgres:10-alpine
  2. FROM docker.0k.io/postgres:10-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/cgit/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. abuild-keygen -a -i && \
  13. abuild -r
  14. USER root
  15. RUN apk add curl
  16. RUN curl -L https://github.com/0k/pgm/raw/master/bin/pgm > /bin/pgm && \
  17. chmod +x /bin/pgm
  18. FROM common
  19. RUN apk -U add pv python file
  20. COPY --from=builder /home/packager/packages/tmp/x86_64/*.apk /tmp/
  21. COPY --from=builder /bin/pgm /bin
  22. RUN apk add /tmp/mbuffer-2018*.apk --allow-untrusted
  23. RUN ln -sf /usr/bin/mbuffer /usr/bin/buffer