-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontainer_setup.sh
More file actions
31 lines (25 loc) · 1.03 KB
/
container_setup.sh
File metadata and controls
31 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CONTAINER_NAME=cosmic
echo "Input the container name for ubuntu 18.10 <recomended: $CONTAINER_NAME>"
read CONTAINER_NAME
echo "Using container:$CONTAINER_NAME"
sleep 3
lxc image copy ubuntu:18.10 local: --alias ubuntu1810
lxc stop --force $CONTAINER_NAME
lxc delete $CONTAINER_NAME
lxc launch ubuntu1810 $CONTAINER_NAME
echo "Ignore warning messages"
sleep 5
lxc exec $CONTAINER_NAME -- rm /tmp/chromeos_setup.sh
lxc exec $CONTAINER_NAME -- curl -o /tmp/chromeos_setup.sh https://raw.githubusercontent.com/lafaspot/chromeOSUbuntu/master/chromeos_setup.sh
lxc exec $CONTAINER_NAME -- bash /tmp/chromeos_setup.sh
echo "Shutdwon the container in progress, type 'lxd exec -- bash' to login into the container"
sleep 3
lxc exec $CONTAINER_NAME -- shutdown -h now
lxc list
sleep 5
lxc start $CONTAINER_NAME
sleep 5
echo "Use the following command to login to you container"
echo "lxc exec $CONTAINER_NAME -- su --login USER"
# to make the ubuntu the default container
# lxc stop penguin; lxc rename penguin origPenguin; lxc rename $CONTAINER_NAME penguin