From c1a1534651545c13bea6938c879df1d71ebe88b0 Mon Sep 17 00:00:00 2001 From: Mikhail Uvarov Date: Tue, 15 Feb 2022 13:56:27 +0100 Subject: [PATCH] Build packages without using volumes --- tools/pkg/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/pkg/build.sh b/tools/pkg/build.sh index 3f59780425..04edb453e4 100755 --- a/tools/pkg/build.sh +++ b/tools/pkg/build.sh @@ -81,7 +81,11 @@ docker build -t mongooseim-${platform}:${version}-${revision} \ -f ${dockerfile_path} \ $context_path +docker rm -f mongooseim-pkg-container &>/dev/null || echo "ok" + # Run ready docker image with tested mongooseim package and move it to # built packages directory -docker run --rm -v "${built_packages_directory}:/built_packages" \ - "mongooseim-${platform}:${version}-${revision}" +docker run --name=mongooseim-pkg-container "mongooseim-${platform}:${version}-${revision}" +# Dot is like /*, but for docker. +# Moves all files in the directory. +docker cp "mongooseim-pkg-container:/built_packages/." "${built_packages_directory}/"