aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: a4a96b7b9ec092230106cb8ce86faa5497c13b1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:16.04

RUN apt-get -y update  \
  && apt-get -y install \
    bc \
    build-essential \
    bzip2 \
    cpio \
    curl \
    g++ \
    git \
    libncurses5-dev \
    locales \
    make \
    patch \
    perl \
    python \
    unzip \
    rsync \
    wget \
  && rm -rf /var/lib/apt/lists/*

RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
    locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

ENV BUILDROOT_VERSION 2016.05
ENV BUILDROOT_HOST_DIR /var/lib/trimui-toolchain
ENV BUILDROOT_SYSROOT ${BUILDROOT_HOST_DIR}/usr/arm-buildroot-linux-gnueabi/sysroot/

RUN useradd -d /home/trimui -m -s /bin/bash -U trimui
RUN mkdir -p ${BUILDROOT_HOST_DIR} && \
  chown -R trimui:trimui ${BUILDROOT_HOST_DIR} && \
  ln -s ${BUILDROOT_HOST_DIR}/usr /opt/trimui-toolchain

USER trimui
WORKDIR /home/trimui

COPY trimui_config trimui_config
COPY build_toolchain.sh *.patch ./
RUN ./build_toolchain.sh

COPY env-setup.sh .

COPY extra_packages.txt .
USER root
RUN apt-get -y update && apt-get -y install $(cat extra_packages.txt) && rm -rf /var/lib/apt/lists/*
USER trimui

COPY extras extras
RUN rsync -av extras/* $BUILDROOT_SYSROOT/usr/

VOLUME /home/trimui/workspace
WORKDIR /home/trimui/workspace

CMD ["/bin/bash"]