社内ネットワークでプロキシを云々するための便利ツール Simple Repeater `stone' をコンテナを使ってビルドします。
Build (EN) Simple Repeater `stone'>, a handy tool for proxies on your corporate network, using a container.
最近はパッケージが提供されてないっぽいので。
It seems that the package has not been provided recently.
docker/podman をインストールしたLinux上でスクリプトを実行します
Run the script on Linux with docker / podman installed
#!/bin/sh
# vim: set ft=sh ff=unix expandtab ts=2 sw=2 :
#set -x
set -e
STONE_SRC_URL='https://osdn.net/cvs/view/stone/stone/?view=tar'
container_name=stone_builder
# container management command
if command -v docker >/dev/null 2>&1; then
CONTAINER_CLI=docker
elif command -v podman >/dev/null 2>&1; then
CONTAINER_CLI=podman
else
echo "ERROR: Requires either docker or podman, stopped."
exit 1
fi
"$CONTAINER_CLI" ps -aq -f "name=$container_name" | xargs -rt podman stop || true
"$CONTAINER_CLI" ps -aq -f "name=$container_name" | xargs -rt podman rm || true
"$CONTAINER_CLI" run -i \
-v "$(pwd)":/mnt \
-w /mnt \
-e STONE_SRC_URL="$STONE_SRC_URL" \
--name "$container_name" \
ubuntu bash <<'...'
set -x
apt update
apt -y install build-essential curl libssl-dev
curl -sSL "$STONE_SRC_URL" | tar zxvf -
cd stone
sed -i 's/SSL_state/SSL_get_state/' stone.c # https://bit.ly/2XY7QSJ
make linux-ssl
...
ビルドが正常終了したら実行ファイルを適宜配置します(例 sudo install stone/stone /usr/local/sbin)
When the build is completed normally, place the executable file appropriately