Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker support #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:trusty

RUN sudo apt-get install software-properties-common --yes
RUN sudo apt-add-repository ppa:ansible/ansible --yes
RUN sudo apt-get update --yes
RUN sudo apt-get install ansible --yes
RUN sudo apt-get install make --yes
RUN sudo apt-get install gawk --yes
RUN sudo apt-get install wget --yes

RUN mkdir -p /t2-build
WORKDIR /t2-build
COPY ansible.yml ansible.yml
RUN ansible-playbook -i "localhost," -c local ansible.yml --extra-vars "build_dir_owner=root"
WORKDIR /work
RUN git clone https://github.com/tessel/openwrt-tessel.git --recursive
RUN git clone https://github.com/tessel/t2-firmware --recursive
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# t2-build

Ansible and Vagrant scripts for building t2. Targets a Ubuntu 14.04 installation or VM.
Ansible, Docker, and Vagrant scripts for building t2. Targets a Ubuntu 14.04 installation or VM.

```

## vagrant

```bash
vagrant up
vagrant ssh
$ cd /work
Expand All @@ -15,6 +18,19 @@ $ cd t2-firmware
$ make -j64
```

## docker

```bash
$ docker build -t t2 .
$ docker create -t -i t2 bash
5bfbfd883d3ee815682a389e55a80551a59df767945cd831e89e6b2f502df67d
$ docker start -a -i 5bfbfd883d3ee815682a389e55a80551a59df767945cd831e89e6b2f502df67d
```

This will land you in bash in the /work directory, with a subdirectory for the
firmware and openwrt-tessel repos. You can run `make -j50 V=s` to build the
OpenWRT image inside openwrt-tessel.

# license

mit/asl2