2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-26 03:47:35 +00:00
criu/scripts/build/Dockerfile.alpine
Adrian Reber 396c37dd62 tests: fix builds on alpine and centos
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

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-23 08:25:07 +03:00

47 lines
774 B
Docker

FROM alpine
ARG CC=gcc
ARG ENV1=FOOBAR
RUN apk update && apk add \
$CC \
bash \
build-base \
ccache \
coreutils \
git \
libaio-dev \
libcap-dev \
libnet-dev \
libnl3-dev \
pkgconfig \
protobuf-c-dev \
protobuf-dev \
python \
sudo
COPY . /criu
WORKDIR /criu
ENV CC="ccache $CC" 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
# Run a test
RUN apk add \
py-yaml \
py-pip \
py2-future \
ip6tables \
iptables \
iproute2 \
tar \
bash \
go \
e2fsprogs \
asciidoc xmlto
# The rpc test cases are running as user #1000, let's add the user
RUN adduser -u 1000 -D test
RUN pip install protobuf ipaddress junit_xml
RUN make -C test/zdtm