Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 31 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
FROM node:8
FROM node:12

RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y build-essential curl

RUN apt-get install -y libgnutls28-dev
RUN apt-get install -y libxml2-utils
RUN apt-get install -y xsltproc
RUN apt-get install -y python-pip
RUN pip install rst2html5

ENV LD_LIBRARY_PATH=/usr/src/libvirt-vroot/lib
ENV PKG_CONFIG_PATH=/usr/src/libvirt-vroot/lib/pkgconfig
ENV LIBVIRT=3.6.0
ENV LIBVIRT=5.6.0
ENV EXT=xz
WORKDIR /usr/src
RUN echo "deb http://security.debian.org/ jessie/updates main contrib" >> /etc/apt/sources.list && \
echo "deb-src http://security.debian.org/ jessie/updates main contrib" >> /etc/apt/sources.list && \
apt-get update -y && apt-get upgrade -y && \
apt-get install -y build-essential curl && \
curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT} && \
tar -xf libvirt-${LIBVIRT}.tar.${EXT} && \
cd libvirt-${LIBVIRT} && \
./configure --prefix=`pwd`/../libvirt-vroot \
RUN curl -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT} | tar xJ

WORKDIR /usr/src/libvirt-${LIBVIRT}/build
RUN ../configure \
--prefix=/usr/src/libvirt-vroot \
--without-libvirtd \
--without-esx \
--without-vbox \
--without-libxl \
--without-xen \
--without-qemu \
--without-lxc \
--without-hyperv \
--without-macvtap \
--disable-werror && \
make -j3 && \
make install
--disable-werror
RUN make -j3
RUN make install

WORKDIR /usr/src
COPY package.json .
COPY package-lock.json .
RUN npm install --ignore-scripts
COPY . .
RUN make && make check
RUN npm install
RUN npm run build

# Needs access to /var/run/docker.sock, so is not run while building the docker image,
# but rather when it is run with `docker run -v /var/run/docker.sock:...`
CMD npm test

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ check:
$(NPM) run test

docker:
docker build .
docker build . -t libvirt-node:latest && docker run --rm -i -v /var/lib/docker.sock:/var/lib/docker.sock libvirt-node:latest
Loading