Intro
let me first state that this is not the normal intended use of containers.
In the normal use case containers are supposed to be ephemeral.
However, in this specific use case I want to use it as a light-weight virtual machine, and therefore I do want to keep it's state at all times.
---
Objective:
- Running a Kali-Linux docker-container inside the Crostini LXC/LXD- Debian-container on a Chromebook.
- Keeping an up-to-date Kali-Linux image with any updates, pen-test-data, and changes made inside the active kali-Linux container so it is easy to create new and/or transport containers with all the latest changes and data. (back-up image with the current state of the current container)
Assumptions:
The Linux-container is active on your Chromebook
Setup Docker:
- Update your Debian LXC/LXD container:
sudo apt update && upgrade -y - Install dependencies:
sudo apt install -y \
apt-transport-https ca-certificates \
curl gnupg2 software-properties-common - Import gpg-key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
(note: don't forget the "-" at the end of the line!) - Add the docker repo to the source list:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" - Update the new resources:
sudo apt update - Install the docker engine (community edition):
sudo apt install -y docker-ce docker-ce-cli containerd.io