-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
79 lines (74 loc) · 2.42 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
68
69
70
71
72
73
74
75
76
77
78
79
FROM ubuntu:16.04 AS qemu
RUN sed -i'~' -E "s@http://(..\.)?archive\.ubuntu\.com/ubuntu@http://pf.is.s.u-tokyo.ac.jp/~awamoto/apt-mirror/@g" /etc/apt/sources.list
RUN apt update
RUN apt install -y \
libglib2.0-dev \
libfdt-dev \
libpixman-1-dev \
libncursesw5-dev \
zlib1g-dev \
flex \
bison \
wget \
build-essential \
checkinstall
RUN wget https://download.qemu.org/qemu-2.12.0.tar.bz2
RUN tar xf qemu-2.12.0.tar.bz2
RUN mkdir build-qemu
WORKDIR build-qemu
RUN ../qemu-2.12.0/configure --enable-curses --target-list=x86_64-softmmu --static
RUN make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
RUN checkinstall -y --maintainer="Shinichi Awamoto \<[email protected]\>" --pkgname="qemu" --pkgversion="2.9.0"
FROM ubuntu:16.04 AS cpputest
RUN apt update
RUN apt install -y cmake git build-essential
RUN git clone git://github.com/cpputest/cpputest.git
RUN mkdir workspace install
WORKDIR workspace
RUN cmake -DCMAKE_INSTALL_PREFIX=../install -DCOVERAGE=ON ../cpputest
RUN make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
RUN make install
FROM ubuntu:16.04
MAINTAINER Shinichi Awamoto <[email protected]>
# delete rsync
RUN set -x \
&& cd \
&& apt clean \
&& sed -i'~' -E "s@http://(..\.)?archive\.ubuntu\.com/ubuntu@http://pf.is.s.u-tokyo.ac.jp/~awamoto/apt-mirror/@g" /etc/apt/sources.list \
&& apt update \
&& apt install -y \
openssh-client \
rsync \
wget \
libelf-dev \
make \
g++ \
telnet \
netcat-openbsd \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt -qy autoremove
WORKDIR /usr/src
# TODO
# COPY --from=qemu /build-qemu/qemu_2.9.0-1_amd64.deb .
RUN wget http://www.pf.is.s.u-tokyo.ac.jp/~awamoto/hakase/qemu_2.9.0-1_amd64.deb \
&& dpkg -i qemu_2.9.0-1_amd64.deb \
&& rm qemu_2.9.0-1_amd64.deb
RUN wget http://www.pf.is.s.u-tokyo.ac.jp/~awamoto/hakase/linux-headers-4.14.34hakase_4.14.34hakase-1_amd64.deb \
&& wget http://www.pf.is.s.u-tokyo.ac.jp/~awamoto/hakase/linux-image-4.14.34hakase_4.14.34hakase-1_amd64.deb \
&& wget http://www.pf.is.s.u-tokyo.ac.jp/~awamoto/hakase/linux-libc-dev_4.14.34hakase-1_amd64.deb \
&& dpkg -i *hakase-1_amd64.deb \
&& rm *hakase-1_amd64.deb
WORKDIR /root
ARG qemu_image_signature="xucqNDjTTtCORC4a"
ADD hakase_qemuimage_${qemu_image_signature}.tar .
RUN mkdir .ssh \
&& chmod 700 .ssh \
&& mv id_rsa* .ssh
COPY --from=cpputest /install /cpputest
COPY qemu .
COPY ssh .
COPY sftp .
COPY monitor .
COPY serial .
COPY netcat .