mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
fixing runc
Signed-off-by: John Dorman <dorman@overlooked.us>
This commit is contained in:
parent
ccfb9b7018
commit
d31df05055
2
.github/workflows/podman-udmse.yml
vendored
2
.github/workflows/podman-udmse.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -24,7 +24,7 @@ minecraft_1 | [init] Starting the Minecraft server...
|
||||
|
||||
## Customization
|
||||
|
||||
* You can disable exposing the docker daemon by commenting out the podman service in [01-podman-update.sh](01-podman-update.sh)
|
||||
* You can disable exposing the docker daemon by commenting out the podman service in [01-podman-update.sh](bin.OLD.DONT USE/01-podman-update.sh)
|
||||
|
||||
## Podman Build Process
|
||||
* This is a custom-built binary by me. It was cross compiled on Ubuntu-20.04 in WSL2.
|
||||
@ -39,13 +39,10 @@ sudo apt-get install libc6-arm64-cross libc6-dev-arm64-cross binutils-aarch64-li
|
||||
```sh
|
||||
make CC="aarch64-linux-gnu-gcc" local-cross
|
||||
```
|
||||
## Steps
|
||||
## Step
|
||||
|
||||
1. Copy [01-podman-update.sh](01-podman-update.sh) to /mnt/data/on_boot.d. Make sure anything needed to enable internet connectivity (wpa-supplicant, eap-proxy) runs before it
|
||||
1. Comment out the Podman service if you do not wish to expose the Docker/Podman Daemon
|
||||
1. Copy [05-install-cni-plugins.sh](../cni-plugins/05-install-cni-plugins.sh) to /mnt/data/on_boot.d
|
||||
1. Recommended: Copy [05-container-common.sh](../container-common/on_boot.d/05-container-common.sh) to /mnt/data/on_boot.d
|
||||
1. Execute /mnt/data/on_boot.d/[01-podman-update.sh](01-podman-update.sh) and /mnt/data/on_boot.d/[05-install-cni-plugins.sh](../cni-plugins/05-install-cni-plugins.sh)
|
||||
1. Goto the Actions tab and get the latest Podman build and unzip it in your the root of your filesystem, something better is coming but for now that will have to do.
|
||||
You can write a script to automate it, i suggest lots of testing though!
|
||||
1. Verify Podman version
|
||||
```sh
|
||||
$ podman version
|
||||
|
@ -3,25 +3,28 @@ FROM golang:1.16-stretch
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y zip git pkg-config libc6-arm64-cross libc6-dev-arm64-cross binutils-aarch64-linux-gnu libncurses5-dev build-essential bison flex libssl-dev bc gcc-aarch64-linux-gnu
|
||||
RUN dpkg --add-architecture arm64 && apt-get update && apt-get install -y libseccomp-dev:arm64 && apt-get install -y libglib2.0-dev:arm64
|
||||
ARG PODMAN_VERSION=v3.4.2
|
||||
ARG RUNC_VERSION=v1.0.2
|
||||
ARG CONMON_VERSION=v2.0.30
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||
RUN dpkg --add-architecture arm64 && apt-get update && apt-get install -y libseccomp-dev:arm64 libglib2.0-dev:arm64 gperf:arm64
|
||||
ARG PODMAN_VERSION=v3.4.4
|
||||
ARG RUNC_VERSION=v1.1.0
|
||||
ARG CONMON_VERSION=v2.1.0
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
ENV CC='aarch64-linux-gnu-gcc'
|
||||
|
||||
COPY ./podman.Makefile.patch /tmp
|
||||
COPY ./runc.Makefile.patch /tmp
|
||||
RUN mkdir -p /build && mkdir -p /tmp/release
|
||||
WORKDIR /build
|
||||
RUN git clone https://github.com/containers/podman && git clone https://github.com/opencontainers/runc && git clone https://github.com/containers/conmon
|
||||
WORKDIR /build/runc
|
||||
|
||||
RUN git checkout $RUNC_VERSION && ./script/release_build.sh -a arm64 -r /tmp/release
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||
ENV GOARCH=arm64
|
||||
ENV CC='aarch64-linux-gnu-gcc'
|
||||
WORKDIR /build/podman
|
||||
RUN git checkout $PODMAN_VERSION && patch Makefile /tmp/podman.Makefile.patch && make vendor local-cross && \
|
||||
cp ./bin/podman.cross.linux.arm64 /tmp/release/podman-$PODMAN_VERSION && chmod +x /tmp/release/podman-$PODMAN_VERSION
|
||||
WORKDIR /build/runc
|
||||
RUN git checkout $RUNC_VERSION && patch Makefile /tmp/runc.Makefile.patch && make vendor localcross && \
|
||||
cp ./runc-arm64 /tmp/release/runc-$RUNC_VERSION && chmod +x /tmp/release/runc-$RUNC_VERSION
|
||||
|
||||
|
||||
WORKDIR /build/conmon
|
||||
RUN git checkout $CONMON_VERSION && make vendor bin/conmon && cp bin/conmon /tmp/release/conmon-$CONMON_VERSION && chmod +x /tmp/release/conmon-$CONMON_VERSION
|
||||
@ -29,7 +32,8 @@ RUN git checkout $CONMON_VERSION && make vendor bin/conmon && cp bin/conmon /tmp
|
||||
RUN mkdir -p /tmp/install/usr/bin && mkdir -p /tmp/install/usr/libexec/podman/ && mkdir -p /tmp/install/usr/share/containers/ && mkdir -p /tmp/install/etc/containers/
|
||||
COPY seccomp.json /tmp/install/usr/share/containers/
|
||||
COPY containers.conf /tmp/install/etc/containers/
|
||||
RUN cp /tmp/release/podman-$PODMAN_VERSION /tmp/install/usr/bin/podman && cp /tmp/release/runc-$RUNC_VERSION /tmp/install/usr/bin/runc && cp /tmp/release/conmon-$CONMON_VERSION /tmp/install/usr/libexec/podman/conmon
|
||||
|
||||
RUN cp /tmp/release/podman-$PODMAN_VERSION /tmp/install/usr/bin/podman && cp /tmp/release/runc.arm64 /tmp/install/usr/bin/runc && cp /tmp/release/conmon-$CONMON_VERSION /tmp/install/usr/libexec/podman/conmon
|
||||
WORKDIR /tmp/install
|
||||
RUN zip -r /tmp/release/podman-install.zip *
|
||||
|
||||
|
@ -8,21 +8,23 @@ RUN dpkg --add-architecture arm64 && apt-get update && apt-get install -y libsec
|
||||
ARG PODMAN_VERSION=v3.4.4
|
||||
ARG RUNC_VERSION=v1.1.0
|
||||
ARG CONMON_VERSION=v2.1.0
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
ENV CC='aarch64-linux-gnu-gcc'
|
||||
|
||||
COPY ./podman.Makefile.se.patch /tmp
|
||||
COPY ./runc.Makefile.patch /tmp
|
||||
RUN mkdir -p /build && mkdir -p /tmp/release
|
||||
WORKDIR /build
|
||||
RUN git clone https://github.com/containers/podman && git clone https://github.com/opencontainers/runc && git clone https://github.com/containers/conmon
|
||||
WORKDIR /build/podman
|
||||
RUN git checkout $PODMAN_VERSION && patch Makefile /tmp/podman.Makefile.se.patch && make vendor local-cross && \
|
||||
cp ./bin/podman.cross.linux.arm64 /tmp/release/podman-$PODMAN_VERSION && chmod +x /tmp/release/podman-$PODMAN_VERSION
|
||||
WORKDIR /build/runc
|
||||
RUN git checkout $RUNC_VERSION && patch Makefile /tmp/runc.Makefile.patch && make vendor localcross && \
|
||||
cp ./runc-arm64 /tmp/release/runc-$RUNC_VERSION && chmod +x /tmp/release/runc-$RUNC_VERSION
|
||||
|
||||
RUN git checkout $RUNC_VERSION && ./script/release_build.sh -a arm64 -r /tmp/release
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||
ENV GOARCH=arm64
|
||||
ENV CC='aarch64-linux-gnu-gcc'
|
||||
WORKDIR /build/podman
|
||||
RUN git checkout $PODMAN_VERSION && patch Makefile /tmp/podman.Makefile.patch && make vendor local-cross && \
|
||||
cp ./bin/podman.cross.linux.arm64 /tmp/release/podman-$PODMAN_VERSION && chmod +x /tmp/release/podman-$PODMAN_VERSION
|
||||
|
||||
|
||||
WORKDIR /build/conmon
|
||||
RUN git checkout $CONMON_VERSION && make vendor bin/conmon && cp bin/conmon /tmp/release/conmon-$CONMON_VERSION && chmod +x /tmp/release/conmon-$CONMON_VERSION
|
||||
@ -30,7 +32,8 @@ RUN git checkout $CONMON_VERSION && make vendor bin/conmon && cp bin/conmon /tmp
|
||||
RUN mkdir -p /tmp/install/usr/bin && mkdir -p /tmp/install/usr/libexec/podman/ && mkdir -p /tmp/install/usr/share/containers/ && mkdir -p /tmp/install/etc/containers/
|
||||
COPY seccomp.json /tmp/install/usr/share/containers/
|
||||
COPY containers.conf /tmp/install/etc/containers/
|
||||
RUN cp /tmp/release/podman-$PODMAN_VERSION /tmp/install/usr/bin/podman && cp /tmp/release/runc-$RUNC_VERSION /tmp/install/usr/bin/runc && cp /tmp/release/conmon-$CONMON_VERSION /tmp/install/usr/libexec/podman/conmon
|
||||
RUN cp /tmp/release/podman-$PODMAN_VERSION /tmp/install/usr/bin/podman && cp /tmp/release/runc.arm64 /tmp/install/usr/bin/runc && cp /tmp/release/conmon-$CONMON_VERSION /tmp/install/usr/libexec/podman/conmon
|
||||
WORKDIR /tmp/install
|
||||
RUN zip -r /tmp/release/podman-install.zip *
|
||||
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4c73e6ab..72a49c5d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -146,10 +146,7 @@ cross: runcimage
|
||||
$(RUNC_IMAGE) make localcross
|
||||
|
||||
localcross:
|
||||
- CGO_ENABLED=1 GOARCH=arm GOARM=6 CC=arm-linux-gnueabi-gcc $(GO_BUILD) -o runc-armel .
|
||||
- CGO_ENABLED=1 GOARCH=arm GOARM=7 CC=arm-linux-gnueabihf-gcc $(GO_BUILD) -o runc-armhf .
|
||||
CGO_ENABLED=1 GOARCH=arm64 CC=aarch64-linux-gnu-gcc $(GO_BUILD) -o runc-arm64 .
|
||||
- CGO_ENABLED=1 GOARCH=ppc64le CC=powerpc64le-linux-gnu-gcc $(GO_BUILD) -o runc-ppc64le .
|
||||
|
||||
.PHONY: runc all recvtty static release dbuild lint man runcimage \
|
||||
test localtest unittest localunittest integration localintegration \
|
Loading…
Reference in New Issue
Block a user