run_sdk_container: Workaround for write-protected /etc/hosts bind-mount

The baselayout package wants to manage the /etc/hosts file and thus
fails to emerge in the SDK container. One would have to build a new
SDK container instead.
To unblock the LTS 3033.3.1 release we can add a workaround to make the
SDK container environment more similar to how cork worked by removing
the /etc/hosts bind mount. This action has to be added to
run_sdk_container instead of sdk_lib/sdk_entry.sh because the existing
SDK's copy of sdk_lib/sdk_entry.sh won't have the change.
This commit is contained in:
Kai Lueke 2022-06-01 14:21:07 +09:00
parent a60ab28eaf
commit 677343ca2e

View File

@ -143,4 +143,7 @@ if [ "$stat" != "Up" ] ; then
$docker start "$name"
fi
# Workaround: The SDK expects to be able to write to /etc/hosts
$docker exec "$name" sh -c 'cp /etc/hosts /etc/hosts2; umount /etc/hosts ; mv /etc/hosts2 /etc/hosts'
$docker exec $tty -i "$name" /home/sdk/sdk_entry.sh "$@"