Last active
July 31, 2018 09:40
-
-
Save Zate/a6be5e5528f177b2e3e2e193b91e350c to your computer and use it in GitHub Desktop.
Writing a script out to automate containers in crostini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
run_container.sh --container_name test --user zate | |
sleep 3 | |
lxc exec test -- sh -c "apt-get update && sleep 1 && apt-get upgrade -y && sleep 1 && apt-get install wget curl -y" | |
sleep 1 | |
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_go.sh -o get_go.sh && chmod +x get_go.sh && ./get_go.sh' | |
sleep 1 | |
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_vscode.sh -o get_vscode.sh && chmod +x get_vscode.sh && ./get_vscode.sh' | |
sleep 1 | |
lxc exec test -- sudo su -l zate -c 'cd ~ && code-insiders .' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /mnt/stateful/lxd_conf | |
curl https://gist.githubusercontent.com/Zate/a6be5e5528f177b2e3e2e193b91e350c/raw/1df734402ca5a1837cd2e0a32ebb932e0365af0f/container.sh -o container.sh -s | |
chmod +x container.sh | |
export PATH=$PATH:/`pwd` | |
container.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment