Docker

HomePage | RecentChanges | Preferences

Difference (from prior major revision) (no other diffs)

Changed: 1,84c1

Docker =


Building a Nerves System ===

* https://hexdocs.pm/nerves/systems.html
* https://rominirani.com/docker-tutorial-series-part-5-building-your-own-docker-images-b4a448b44afc#.mpag2oewy


$ docker run -it ubuntu /bin/bash
# apt-get update
# apt-get install ... [list from Nerves docs]
# apt-get install wget cpio python bzip2 [if still missing from Nerves docs]
# git clone https://github.com/nerves-project/nerves_system_br.git
# git clone https://github.com/wsmoak/nerves_system_rpi2.git # forked from nerves-project
# ./nerves_system_br/create-build.sh nerves_system_rpi2/nerves_defconfig rpi2_out
# cd rpi2_out
# make


... wait while it downloads half the internet and builds stuff ...

To get a tarball

# cd rpi2_out
# make system


* http://stackoverflow.com/questions/19585028/i-lose-my-data-when-the-container-exits
* https://washraf.gitbooks.io/the-docker-ecosystem/content/Chapter%203/Section%203/docker_commit.html


# exit
$ docker ps -a # copy the id
$ docker commit [the_id] wsmoak/nerves_build


... wait a long time


$ docker images
$ docker run -it wsmoak/nerves_build /bin/bash
# ls rpi2_out/images
# exit



$ docker ps -a
$ docker start [name]
$ docker attach [name]
(and press enter to get a # prompt)


Making files available outside the container

$ docker run -it -v /Users/wsmoak/docker_stuff/:/tmp/on_my_mac wsmoak/nerves_build /bin/bash
# cp /path/to/whatever /tmp/on_my_mac/
# exit
$ ls ~/docker_stuff


Making changes

# cd rpi2_out
# make menuconfig
... use buildroot menu to find and select things ...
<Save> writes .config file
# make savedefconfig
... updates the nervesdefconfig _over_ in the nerves_system_rpi2 directory
# cd ..
# ./nerves_system_br/create-build.sh nerves_system_rpi2/nerves_defconfig rpi2_out2
... different output directory ...
cd rpi2_out2
make
... wait while it builds everything. at least no downloads this time?...
make system
... creates a tarball


Copy tarball to `/tmp/on_my_mac` which is mapped to `~/docker_stuff`

Misc




Mount the data partition of a Nerves built SD card
docker run -it --rm -v /Volumes/APPDATA:/appdata busybox
Moved to https://github.com/wendysmoak/wiki/wiki/Docker

Moved to https://github.com/wendysmoak/wiki/wiki/Docker

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited December 21, 2019 6:27 am by 78-93-98-198.dsl.wavetel.us (diff)
Search: