forked from 0k/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.
50 lines
1.3 KiB
50 lines
1.3 KiB
## is a simple copy of postgis/postgis:10-3.0-alpine
|
|
FROM docker.0k.io/postgis:10-3.0-alpine as common
|
|
|
|
FROM common AS builder
|
|
|
|
|
|
RUN apk -U add alpine-sdk curl
|
|
RUN adduser -D packager && addgroup packager abuild
|
|
|
|
## Orig: https://git.alpinelinux.org/aports/plain/testing/mbuffer/APKBUILD?id=026cabf316eb477b2ae3e26dadc3e9c30ff26626
|
|
ENV MBUFFER_APKBUILD_URL=https://docker.0k.io/downloads/mbuffer-alpine-APKBUILD
|
|
|
|
USER packager
|
|
|
|
RUN mkdir -p /tmp/build && \
|
|
curl -L "${MBUFFER_APKBUILD_URL}" > /tmp/build/APKBUILD
|
|
|
|
RUN cd /tmp/build && \
|
|
sed -ri 's/^(\s+make -j1 check.*)/#\1/g' APKBUILD && \
|
|
sed -ri 's%^source="http://www.maier-komor.de/software/mbuffer/mbuffer-\$pkgver.tgz"%source="https://docker.0k.io/downloads/mbuffer-$pkgver.tgz"%' APKBUILD && \
|
|
abuild-keygen -a -i && \
|
|
abuild -r
|
|
|
|
USER root
|
|
|
|
RUN apk add curl
|
|
|
|
RUN curl -L https://raw.githubusercontent.com/0k/pgm/0.0.6/bin/pgm > /bin/pgm && \
|
|
chmod +x /bin/pgm
|
|
|
|
FROM common
|
|
|
|
RUN apk -U add pv python2 file sed coreutils
|
|
|
|
COPY --from=builder /home/packager/packages/tmp/x86_64/*.apk /tmp/
|
|
COPY --from=builder /bin/pgm /bin
|
|
|
|
RUN apk add /tmp/mbuffer-20*.apk --allow-untrusted
|
|
|
|
RUN apk add gzip
|
|
|
|
RUN ln -sf /usr/bin/mbuffer /usr/bin/buffer
|
|
|
|
|
|
##
|
|
## Install less capability
|
|
##
|
|
|
|
RUN apk add less && \
|
|
echo "\setenv PAGER 'less -SFX'" >> /var/lib/postgresql/.psqlrc
|