Skip to content

Instantly share code, notes, and snippets.

@pstjuste
Last active January 21, 2019 18:59
Show Gist options
  • Save pstjuste/0369f140fe100bc977eced2299968cc7 to your computer and use it in GitHub Desktop.
Save pstjuste/0369f140fe100bc977eced2299968cc7 to your computer and use it in GitHub Desktop.
# start docker
sudo start docker
# stop docker
sudo stop docker
# list images
sudo docker images
# list containers
sudo docker ps -a
# run container with usb access to run adb
sudo docker run -i --privileged -v /dev/bus/usb:/dev/bus/usb muicoder/adb:latest
#copying files
sudo docker cp test.txt 65d8599bef0e:/root/
# list adb devices
sudo docker exec adbd adb devices
# generating hashed password with openssl from boot iso
openssl passwd -1 > container.config
# you can also use mkpasswd to do the same thing
mkpasswd --method=SHA-512 --rounds=4096 > container.config
# update the newly generated container.config to use format below
passwd:
users:
- name: user
password_hash: "$6$43y3tkl..."
ssh_authorized_keys:
- key1
# installing on persistent disk with custom container config
sudo coreos-install -d /dev/sda -C stable -c container.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment