|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
#
|
|
# Filename: target/share/docker/build.sh
|
|
# Copyright (C) 2016 - 2020 The OpenSDE Project
|
|
#
|
|
# More information can be found in the files COPYING and README.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
# GNU General Public License can be found in the file COPYING.
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
#Description: Build a compressed rootfs for docker images
|
|
|
|
set -e
|
|
. $base/target/share/functions.in
|
|
|
|
dockerdir="$build_toolchain/docker"
|
|
imagelocation="$build_toolchain/rootfs" # where the roofs is prepared and compress.
|
|
rm -rf $dockerdir
|
|
rm -rf $imagelocation
|
|
mkdir -p $dockerdir
|
|
mkdir -p $imagelocation
|
|
cd $build_toolchain/pkgs
|
|
|
|
echo "Populating the root file-system (this may take some time) ..."
|
|
for pack in *.bz2; do
|
|
tar -xjf $pack -C $imagelocation
|
|
done
|
|
echo "Creating root file-system (this may take some time) ..."
|
|
cd $dockerdir
|
|
time tar -cjf rootfs.tar.bz2 -C $imagelocation .
|
|
|
|
echo_status "Done!"
|