FROM alpine:3.5
ARG CC=gcc
RUN apk update && apk add \
                build-base \
                coreutils \
                git \
                protobuf-c-dev \
                protobuf-dev \
                python \
                libaio-dev \
                libcap-dev \
                libnl3-dev \
                pkgconfig \
                libnet-dev \
                $CC

COPY . /criu
WORKDIR /criu
RUN make mrproper && make -j $(nproc) CC=$CC

# to run tests
RUN apk add	py-yaml \
		py-pip	\
		ip6tables \
		iptables \
		iproute2

RUN pip install protobuf
RUN make -C test/zdtm/static env00
