2019-08-12 12:41:53 +04:00
|
|
|
#!/bin/sh
|
2020-02-10 14:35:05 +04:00
|
|
|
set -e
|
2019-08-12 12:41:53 +04:00
|
|
|
|
|
|
|
dockerfile_name="package"
|
|
|
|
dockerfile=""
|
|
|
|
. ./scripts/distribution/generic/parameters.sh
|
|
|
|
|
|
|
|
if [ -n "$dockerfile" ]; then
|
|
|
|
echo "Packaging LIGO for $target"
|
|
|
|
echo "Using Dockerfile: $dockerfile"
|
|
|
|
echo "Using pre-built image: $tag_build"
|
|
|
|
echo "Version: $version\n"
|
|
|
|
|
|
|
|
# Build the package
|
|
|
|
docker build --build-arg targetBuildImage="$tag_build" --build-arg version="$version" -t "$tag_package" -f "$dockerfile" .
|
|
|
|
# Copy the package to host's (our own) file system
|
|
|
|
mkdir -p "$PWD/dist/package/$target"
|
2019-10-01 18:21:01 +04:00
|
|
|
docker run --entrypoint '/bin/sh' -v $PWD:$PWD "$tag_package" -c "cp -r /package/dist/. $PWD/dist/package/$target"
|
2019-08-12 12:41:53 +04:00
|
|
|
else
|
|
|
|
echo "Dockerfile not found for target: $target"
|
2019-10-01 18:21:01 +04:00
|
|
|
fi
|