Skip to content

Instantly share code, notes, and snippets.

@dotysan
Last active April 15, 2026 21:42
Show Gist options
  • Select an option

  • Save dotysan/689a4b3440d32f1a48ecd9547cbcc89d to your computer and use it in GitHub Desktop.

Select an option

Save dotysan/689a4b3440d32f1a48ecd9547cbcc89d to your computer and use it in GitHub Desktop.
build static pv in a docker container & install in user home

build static pv in a docker container & install in user home

This installs minimalist Pipe Viewer.

Installation

  • ./install-pv.sh
FROM alpine:3.23.4 as pv-build
ARG PV_VER=1.10.5
ARG TB="https://ivarch.com/s/pv-$PV_VER.tar.gz"
RUN until \
wget --no-verbose --output-document=- $TB \
|tar -xzf- \
; do sleep 1 ; done
RUN apk add --no-cache \
gcc \
make \
musl-dev \
&& :
WORKDIR /pv-$PV_VER
RUN ./configure --enable-static \
&& \
make -j \
&& \
make install
FROM scratch AS pv-artifacts
COPY --from=pv-build /usr/local /
#! /usr/bin/env bash
#
# build static pv in a docker container & install in user home
#
set -e
set -u
set -x
main() {
if ! hash docker
then
"ERROR: Need docker to build."
exit 1
fi >&2
docker buildx build --progress=plain --tag build-pv \
--output type=local,dest=./artifacts \
.
cp --force --archive --link artifacts/bin/pv ~/bin/
}
main
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment