以下 BASH 脚本在 Docker 容器中下载并构建mpv(https://github.com/mpv-player/mpv-build),并使用 netcat 将文件发送到主机(主机正在使用 netcat 侦听):
HOSTIP="192.168.1.100"
PORT="62514"
nc -v -l $PORT > mpv &
sleep 1
sudo docker run ubuntu:14.04 /bin/bash -c "\
sed -i -e 's/# deb/deb/g' /etc/apt/sources.list; \
cat /etc/apt/sources.list; \
apt-get update; \
apt-get install --yes --force-yes git python-minimal; \
git clone https://github.com/mpv-player/mpv-build.git; \
cd mpv-build/; \
./update; \
apt-get install --yes --force-yes devscripts equivs; \
rm -f mpv-build-deps_*_*.deb; \
mk-build-deps -i -t \"apt-get --yes --force-yes --no-install-recommends\"; \
./build …Run Code Online (Sandbox Code Playgroud)