Hi Simon,

Thanks for that! I was about to get into something similar for B2G.

Regarding your dockerfile:
- I'd suggest you don't build as root in your container, but create a user
instead. This avoids build side effects, weird permissions and security
issues.
- It's better for caching if you put as many `apt` commands into the same
RUN instruction. Currently, your `apt-get update` can remain cached with
older package refs, which could break subsequent `apt-get install`s.

I tried to respect these kinds of best practices in dockerfiles I wrote for
Firefox and Chromium [1].
Also, wouldn't it be better if steps 2, 3 and 4 are merged into your
dockerfile?

[1] https://github.com/jankeromnes/dockerfiles



On Mon, Sep 15, 2014 at 12:20 PM, <[email protected]> wrote:

> Hello!
> Yesterday I wanted to try to build B2G for my Nexus 4, and quickly
> discovered that doing so for Arch is quite hacky[1] so I decided to build a
> Docker image for the task based on Ubuntu 14.04.
>
> I have only tested it for Nexus 4 so I would imagine that lots of deps are
> missing for other platforms(please send a PR[2] :)
>
> If you want to try it out its simple as
> 1. Having docker installed and properly working
> 2. git clone https://github.com/mozilla-b2g/B2G.git
> 3. cd B2G
> 4. ./config.sh device-name
> 5. docker run -v $PWD:/B2G -i -t simonjohansson/b2g-build
>
> After this you should have the neccecary
> ./out/target/product/mako/{boot.img,system.img,userdata.img,recovery.img}
> neccecary to flash your target.
>
> I hope this is helpful for someone!
>
> [1]
> https://developer.mozilla.org/zh-TW/Firefox_OS/Firefox_OS_build_prerequisites#Arch_Linux
> [2] https://github.com/simonjohansson/B2G-build
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
>
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to