-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (46 loc) · 1.79 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
FROM ubuntu:18.04
MAINTAINER Farhan Patwa <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive
ENV USER root
# build depends
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential software-properties-common ca-certificates libssl-dev \
libvirt-dev libvirt-daemon-system automake ruby-dev ruby-libvirt \
qemu libguestfs-tools libglib2.0-0 libglib2.0-dev libpixman-1-dev \
python3-pip gcc pkg-config bison flex checkinstall wget jq p7zip unzip && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Download, build and install QEMU 4.2
RUN wget https://download.qemu.org/qemu-4.2.0.tar.xz && \
tar xvJf qemu-4.2.0.tar.xz
WORKDIR qemu-4.2.0
RUN ./configure --target-list=x86_64-softmmu && \
make -j$(nproc) && \
checkinstall -y make install
WORKDIR /
RUN rm -fr qemu-4.2.0 qemu-4.2.0.tar.xz
# Download, build and install make 4.2.1
RUN wget https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz && \
tar -xzf make-4.2.1.tar.gz
WORKDIR make-4.2.1
RUN sed -i \
's/_GNU_GLOB_INTERFACE_VERSION =/_GNU_GLOB_INTERFACE_VERSION >/' \
configure.ac && \
./configure --prefix=/usr && \
make -j$(nproc) && \
make install
WORKDIR /
RUN rm -fr make-4.2.1 make-4.2.1.tar.gz
# Download and install vagrant
RUN wget https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.deb && \
dpkg -i vagrant_2.2.19_x86_64.deb && \
vagrant plugin install vagrant-libvirt && \
rm -f vagrant_2.2.19_x86_64.deb
# Download and install packer
RUN wget https://releases.hashicorp.com/packer/1.3.4/packer_1.3.4_linux_amd64.zip && \
unzip packer_1.3.4_linux_amd64.zip && \
mv packer /usr/bin/ && \
rm -f packer_1.3.4_linux_amd64.zip
WORKDIR /