Added Docker file to init build enviorement and Docker.md with instructions

This commit is contained in:
Dimitar Gamishev 2018-12-17 13:55:22 +02:00
parent d4cdeafa74
commit 14db330b69
2 changed files with 48 additions and 0 deletions

@ -0,0 +1,17 @@
FROM ubuntu:xenial
RUN apt-get update
RUN apt-get install -y git-core build-essential
RUN apt-get install -y g++-4.9-aarch64-linux-gnu gcc-4.9-aarch64-linux-gnu \
g++-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf
RUN apt-get install -y device-tree-compiler
RUN apt-get install -y dos2unix
RUN apt-get install -y ccache gcc-aarch64-linux-gnu
RUN apt-get install -y u-boot-tools
RUN apt-get install -y kpartx bsdtar mtools bc
RUN cd /usr/bin/ && \
ln -s arm-linux-gnueabihf-gcc-4.7 arm-linux-gnueabihf-gcc && \
ln -s arm-linux-gnueabihf-g++-4.7 arm-linux-gnueabihf-g++ && \
ln -s arm-linux-gnueabihf-cpp-4.7 arm-linux-gnueabihf-cpp

@ -0,0 +1,31 @@
#Using docker to set up build enviorement
## 1.Installing Docker
Ex Ubuntu:
https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce
for any other OS folow instruction on docker.com
### 2.Building image
```bash
cd DIY-LAPTOP/SOFTWARE/A64-TERES/
docker build - < Dockerfile
```
if build is successful,you can list you image with
```bash
docker image list
```
#### 3.Running image
Run :
```bash
docker build -q - < Dockerfile
```
you will recieve as ouptur docker image id, to run it :
```bash
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" id_from_previous_command
```
Now you can follow instructions in README, just skip toolchain installation step