Skip to content

Commit

Permalink
Package CRIU
Browse files Browse the repository at this point in the history
  • Loading branch information
avmnu-sng committed Jan 31, 2024
1 parent 057a511 commit 18225fe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 75 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
cat <<EOF >> ${{ matrix.nftables }}-multi-stage.Dockerfile
FROM --platform=${{ env.PLATFORM }} ${{ matrix.base }}
COPY --from=${{ env.TAG_TEST }} /criu/ /
RUN apk --update --no-cache add libnet libnl3 nftables protobuf-c
EOF
if [[ $? != 0 ]]; then
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ then:
FROM --platform=amd64 alpine:3.18.5@sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389

COPY --from=criu-with-nftables:criu-3.19-alpine-3.18.5 /criu/ /

# Install deps
RUN apk --update --no-cache add libnet libnl3 nftables protobuf-c
```
57 changes: 0 additions & 57 deletions multi-stage-setup.py

This file was deleted.

14 changes: 5 additions & 9 deletions with-nftables.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN apk --update --no-cache add \
procps \
gcc \
git \
gnutls-dev \
libaio-dev \
libcap-dev \
libnet-dev \
Expand All @@ -29,14 +28,11 @@ RUN apk --update --no-cache add \
libdrm-dev \
util-linux

WORKDIR /tmp

RUN wget "http://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}/criu-${CRIU_VERSION}.tar.gz" && \
tar -xzf "criu-${CRIU_VERSION}.tar.gz" && \
cd "criu-${CRIU_VERSION}" && \
make -j $(nproc) install-criu

COPY multi-stage-setup.py multi-stage-setup.py

RUN chmod +x multi-stage-setup.py && \
./multi-stage-setup.py
make -j $(nproc) CONFIG_AMDGPU=n PREFIX=/usr DESTDIR=/criu LIBDIR=/usr/lib LD=gcc install && \
rm -f /criu/usr/lib/*.a && \
rm -rf /criu/usr/lib/python3* && \
rm -rf /criu/usr/libexec/compel/*.a && \
rm -f /criu/usr/libexec/criu/scripts/systemd-autofs-restart.sh
14 changes: 5 additions & 9 deletions without-nftables.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN apk --update --no-cache add \
procps \
gcc \
git \
gnutls-dev \
libaio-dev \
libcap-dev \
libnet-dev \
Expand All @@ -27,14 +26,11 @@ RUN apk --update --no-cache add \
libdrm-dev \
util-linux

WORKDIR /tmp

RUN wget "http://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}/criu-${CRIU_VERSION}.tar.gz" && \
tar -xzf "criu-${CRIU_VERSION}.tar.gz" && \
cd "criu-${CRIU_VERSION}" && \
make -j $(nproc) install-criu

COPY multi-stage-setup.py multi-stage-setup.py

RUN chmod +x multi-stage-setup.py && \
./multi-stage-setup.py
make -j $(nproc) CONFIG_AMDGPU=n PREFIX=/usr DESTDIR=/criu LIBDIR=/usr/lib LD=gcc install && \
rm -f /criu/usr/lib/*.a && \
rm -rf /criu/usr/lib/python3* && \
rm -rf /criu/usr/libexec/compel/*.a && \
rm -f /criu/usr/libexec/criu/scripts/systemd-autofs-restart.sh

0 comments on commit 18225fe

Please sign in to comment.