The overlay structure is copied in proper way (this was serious bug).

This commit is contained in:
Ivan Davidov 2017-12-02 03:28:23 +02:00
parent 5843070fd1
commit 5dd6368e69
2 changed files with 25 additions and 15 deletions

View File

@ -23,10 +23,12 @@ fi
if [ -d $SRC_DIR/work/overlay_rootfs ] ; then if [ -d $SRC_DIR/work/overlay_rootfs ] ; then
echo "Merging overlay software in image." echo "Merging overlay software in image."
# Copy the overlay area. # Copy the overlay content.
cp -r $SRC_DIR/work/overlay_rootfs/* \ # With '--remove-destination' all possibly existing soft links in
# '$SRC_DIR/work/mll_image' will be overwritten correctly.
cp -r --remove-destination $SRC_DIR/work/overlay_rootfs/* \
$SRC_DIR/work/mll_image $SRC_DIR/work/mll_image
cp -r $SRC_DIR/minimal_overlay/rootfs/* \ cp -r --remove-destination $SRC_DIR/minimal_overlay/rootfs/* \
$SRC_DIR/work/mll_image $SRC_DIR/work/mll_image
else else
echo "MLL image will have no overlay software." echo "MLL image will have no overlay software."
@ -47,7 +49,7 @@ cat << CEOF
# # # #
# docker import mll_image.tgz minimal-linux-live:latest # # docker import mll_image.tgz minimal-linux-live:latest #
# # # #
# Then you can run MLL container in Docker like this: # # Then you can run MLL shell in Docker container like this: #
# # # #
# docker run -it minimal-linux-live /bin/sh # # docker run -it minimal-linux-live /bin/sh #
# # # #

View File

@ -8,17 +8,21 @@ TEMP_DIR=xxx
MLL_ISO=xxx MLL_ISO=xxx
finalWords() { finalWords() {
cat << CEOF cat << CEOF
Minimal Linux Live image 'mll_image.tgz' has been generated. ##################################################################
# #
You can import the MLL image in Docker like this: # Minimal Linux Live image 'mll_image.tgz' has been generated. #
# #
docker import mll_image.tgz minimal-linux-live:latest # You can import the MLL image in Docker like this: #
# #
Then you can run MLL container in Docker like this: # docker import mll_image.tgz minimal-linux-live:latest #
# #
docker run -it minimal-linux-live /bin/sh # Then you can run MLL shell in Docker container like this: #
# #
# docker run -it minimal-linux-live /bin/sh #
# #
##################################################################
CEOF CEOF
} }
@ -40,7 +44,11 @@ prepareImage() {
cp -r $TEMP_DIR/rootfs_extracted/* $TEMP_DIR/image_root cp -r $TEMP_DIR/rootfs_extracted/* $TEMP_DIR/image_root
if [ -d $TEMP_DIR/iso_extracted/minimal/rootfs ] ; then if [ -d $TEMP_DIR/iso_extracted/minimal/rootfs ] ; then
cp -r $TEMP_DIR/iso_extracted/minimal/rootfs/* $TEMP_DIR/image_root # Copy the overlay content.
# With '--remove-destination' all possibly existing soft links in
# '$TEMP_DIR/image_root' will be overwritten correctly.
cp -r --remove-destination $TEMP_DIR/iso_extracted/minimal/rootfs/* \
$TEMP_DIR/image_root
fi fi
} }