Docker build image


#1

While waiting for the latest RBPI B+ I’m going to give it a go and try a build.
Does anybody use docker for building and can share a Dockerfile?


#2

We don’t officially release docker image for developers. It’s really good to share docker image to docker hub. I also wait for it.


#3

This will be a interesting solution for developing app :smiley:


#4

Here you go:

Dockerfile:

FROM ubuntu:14.04

RUN apt-get update && apt-get install -y git
RUN useradd -u 1000 -s /bin/bash -d /build -m builder
RUN echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER builder
ADD build.sh /

CMD /build.sh

build.sh:

#!/bin/bash
cd /build
git clone https://github.com/webosose/build-webos.git
cd build-webos
sudo scripts/prerequisites.sh
./mcf raspberrypi3
make webos-image

To store the data on the local machine create a directory for it to run in, and make sure user 1000 has write permissions, volume mount the directory as /build

mkdir build
chmod 777 build
docker run -it -v ${PWD}/build:/build webosbuilder

come back a few hours later.