-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
71 lines (63 loc) · 1.94 KB
/
Dockerfile
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
59
60
61
62
63
64
65
66
67
FROM ubuntu:16.04
MAINTAINER Yongjia Niu, [email protected]
# Install essential Yocto Project host packages
# Clean up the apt cache by removing /var/lib/apt/lists toreduces the image size
# Install repo tool with tinghua mirror: https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
# Origin: http://commondatastorage.googleapis.com/git-repo-downloads/repo
# See: https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/
# Create a non-root user that will perform the actual build
# Fix error "Please use a locale setting which supports utf-8."
# See https://wiki.yoctoproject.org/wiki/TipsAndTricks/ResolvingLocaleIssues
RUN apt-get update && apt-get install -y \
gawk \
wget \
git-core \
diffstat \
unzip \
texinfo \
gcc-multilib \
build-essential \
chrpath \
socat \
libsdl1.2-dev \
xterm \
sed \
cvs \
subversion \
coreutils \
texi2html \
docbook-utils \
python-pysqlite2 \
help2man \
make \
gcc \
g++ \
desktop-file-utils \
libgl1-mesa-dev \
libglu1-mesa-dev \
mercurial \
autoconf \
automake \
groff \
curl \
lzop \
asciidoc \
u-boot-tools \
cpio \
sudo \
locales \
&& rm -rf /var/lib/apt/lists/* \
&& curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > /usr/bin/repo \
&& chmod a+x /usr/bin/repo \
&& id build 2>/dev/null || useradd --uid 30000 --create-home build \
&& echo "build ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& echo 'LANG="en_US.UTF-8"'>/etc/default/locale \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
USER build
WORKDIR /home/build
CMD "/bin/bash"