Skip to content

Instantly share code, notes, and snippets.

@woodrow-shen
Last active August 23, 2016 07:40
Show Gist options
  • Save woodrow-shen/f64fa4365802ec066f87 to your computer and use it in GitHub Desktop.
Save woodrow-shen/f64fa4365802ec066f87 to your computer and use it in GitHub Desktop.

Hack 15.04 Ubuntu-Device-Flash on Docker

PPA

https://launchpad.net/~snappy-dev/+archive/ubuntu/tools/+packages

dget -u https://launchpad.net/~snappy-dev/+archive/ubuntu/tools/+files/goget-ubuntu-touch_0.31-0ubuntu1.dsc

Generate dependencies

go get launchpad.net/godeps
godeps -t -u dependencies.tsv

Build goget-ubuntu-touch

go get launchpad.net/goget-ubuntu-touch

Build u-d-f ONLY

go build -v launchpad.net/goget-ubuntu-touch/ubuntu-device-flash

Install u-d-f ONLY

go install -v launchpad.net/goget-ubuntu-touch/ubuntu-device-flash

Generate ssh-key

ssh-keygen -t rsa

Generate udevadm wrapper

refer https://github.com/woodrow-shen/build-snappy-on-docker

Generate snappy uid/gid

sudo useradd -r -s /bin/false -d /nonexistent -U clickpkg
sudo useradd -r -s /bin/false -d /nonexistent -U snappypkg

Add device-mapper caps. to /etc/default/docker

DOCKER_OPTS="--storage-driver=devicemapper --storage-opt dm.basesize=10G"

Create a docker with --privileged

sudo docker build --rm --tag="woodrowshen/snappy-vivid:v1" .
sudo docker run -p 8080:8080 --privileged -it -v /image:/host woodrowshen/snappy-vivid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment