mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-26 03:47:35 +00:00
Install sudo, create test user with ID 1000, install bash, fix pidfile creation and pidfile chmod. v2: * use sleep to give the criu daemon some time to start up v3: * Andrei is of course right and sleep is not good solution. After adding --status-fd support to criu service, this is how we now detect that criu is ready. v4: * This was much more complicated than expected which is related to the different versions of the tools on the different travis test targets. There seems to be a bug in bash on Ubuntu https://lists.gnu.org/archive/html/bug-bash/2017-07/msg00039.html which prevents using 'read -n1' on Ubuntu. As a workaround the result from CRIU's status FD is now read via python. Another problem was discovered on alpine with the loop restore test. CRIU says to use setsid even if the process is already using setsid. As a workaround, still with setsid, this process is now using shell-job true for checkpoint and restore. Parts of v2 have been committed before. So the changes from this commit are partially already in another commit. Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
48 lines
861 B
Docker
48 lines
861 B
Docker
FROM centos:7
|
|
|
|
ARG CC=gcc
|
|
ARG ENV1=FOOBAR
|
|
|
|
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
|
RUN yum install -y \
|
|
ccache \
|
|
findutils \
|
|
gcc \
|
|
git \
|
|
iproute \
|
|
iptables \
|
|
libaio-devel \
|
|
libasan \
|
|
libcap-devel \
|
|
libnet-devel \
|
|
libnl3-devel \
|
|
make \
|
|
procps-ng \
|
|
protobuf-c-devel \
|
|
protobuf-devel \
|
|
protobuf-python \
|
|
python \
|
|
python-ipaddress \
|
|
python2-future \
|
|
python2-junit_xml \
|
|
python-yaml \
|
|
python-six \
|
|
sudo \
|
|
tar \
|
|
which \
|
|
e2fsprogs \
|
|
python2-pip \
|
|
asciidoc xmlto
|
|
|
|
COPY . /criu
|
|
WORKDIR /criu
|
|
|
|
ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
|
|
RUN mv .ccache /tmp && make mrproper && ccache -sz && \
|
|
date && make -j $(nproc) CC="$CC" && date && ccache -s
|
|
|
|
# The rpc test cases are running as user #1000, let's add the user
|
|
RUN adduser -u 1000 test
|
|
|
|
RUN make -C test/zdtm -j $(nproc)
|