diff --git a/install.sh b/install.sh index 068bfa7..6524916 100755 --- a/install.sh +++ b/install.sh @@ -63,14 +63,12 @@ else echo "[WARN] gost hash mismatch: $LOCAL_GOST_HASH. Expected: $VERIFIED_GOST_HASH" fi -sudo podman build . -f DockerfileBase -t wg-ops-base:latest -sudo podman build . -f DockerfileBuildEnv -t wg-ops-buildenv:latest -sudo podman build . -f DockerfileRunEnv -t wg-ops-runenv:latest - podman build . -f DockerfileBase -t wg-ops-base:latest podman build . -f DockerfileBuildEnv -t wg-ops-buildenv:latest podman build . -f DockerfileRunEnv -t wg-ops-runenv:latest +podman save wg-ops-runenv:latest | sudo podman load + CONTAINER_ID=$(podman run --rm -it -v ./bin:/root/bin -d wg-ops-buildenv) podman cp mux.c $CONTAINER_ID:/root/ podman exec -it $CONTAINER_ID bash -c "cd /root && gcc -O3 -o bin/mux mux.c" diff --git a/install_cn.sh b/install_cn.sh index 50f488e..19a4246 100755 --- a/install_cn.sh +++ b/install_cn.sh @@ -62,14 +62,12 @@ else echo "[WARN] gost hash mismatch: $LOCAL_GOST_HASH. Expected: $VERIFIED_GOST_HASH" fi -sudo podman build . -f DockerfileBaseCN -t wg-ops-base:latest -sudo podman build . -f DockerfileBuildEnv -t wg-ops-buildenv:latest -sudo podman build . -f DockerfileRunEnv -t wg-ops-runenv:latest - podman build . -f DockerfileBaseCN -t wg-ops-base:latest podman build . -f DockerfileBuildEnv -t wg-ops-buildenv:latest podman build . -f DockerfileRunEnv -t wg-ops-runenv:latest +podman save wg-ops-runenv:latest | sudo podman load + CONTAINER_ID=$(podman run --rm -it -v ./bin:/root/bin -d wg-ops-buildenv) podman cp mux.c $CONTAINER_ID:/root/ podman exec -it $CONTAINER_ID bash -c "cd /root && gcc -O3 -o bin/mux mux.c"