mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
Merge pull request #576 from justincormack/alpine-aufs-build
Use patched aufs-utils so can compile kernel with alpine
This commit is contained in:
commit
6fb163c2a5
@ -1,2 +1,22 @@
|
||||
FROM alpine:3.4
|
||||
RUN apk update && apk upgrade && apk add build-base util-linux-dev linux-headers
|
||||
RUN \
|
||||
apk update && apk upgrade && \
|
||||
apk add \
|
||||
alpine-sdk \
|
||||
automake \
|
||||
bash \
|
||||
bc \
|
||||
curl \
|
||||
gmp-dev \
|
||||
installkernel \
|
||||
kmod \
|
||||
linux-headers \
|
||||
perl \
|
||||
sed \
|
||||
squashfs-tools \
|
||||
syslinux \
|
||||
unzip \
|
||||
util-linux-dev \
|
||||
vim \
|
||||
xz \
|
||||
&& true
|
||||
|
@ -1,24 +0,0 @@
|
||||
FROM debian:jessie
|
||||
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get -y install \
|
||||
unzip \
|
||||
xz-utils \
|
||||
curl \
|
||||
bc \
|
||||
build-essential \
|
||||
cpio \
|
||||
gcc libc6 libc6-dev \
|
||||
kmod \
|
||||
squashfs-tools \
|
||||
genisoimage \
|
||||
xorriso \
|
||||
syslinux \
|
||||
isolinux \
|
||||
automake \
|
||||
pkg-config \
|
||||
git \
|
||||
ncurses-dev \
|
||||
p7zip-full \
|
||||
lzop \
|
||||
wget \
|
||||
vim
|
@ -1,14 +0,0 @@
|
||||
# no easy hashing scheme for Debian, will switch to Alpine soon so temporarily use sha256
|
||||
.PHONY: push
|
||||
|
||||
BASE=debian:jessie
|
||||
IMAGE=debian-build-kernel
|
||||
|
||||
TAG := $(shell cat /dev/urandom | od -N6 -t x2 | head -n1 | cut -b9- | sed 's/ //g')
|
||||
|
||||
push:
|
||||
docker pull $(BASE)
|
||||
tar cf - Dockerfile | docker build --no-cache -t mobylinux/$(IMAGE):$(TAG) -
|
||||
docker tag mobylinux/$(IMAGE):$(TAG) mobylinux/$(IMAGE):latest
|
||||
docker push mobylinux/$(IMAGE):$(TAG)
|
||||
docker push mobylinux/$(IMAGE):latest
|
@ -1,4 +1,4 @@
|
||||
FROM mobylinux/debian-build-kernel:a009a11bf0ad
|
||||
FROM mobylinux/alpine-build-c:50a89f207d5fc98ce750d694077c75a31ab7937d
|
||||
|
||||
ARG KERNEL_VERSION=4.4.22
|
||||
|
||||
@ -19,8 +19,8 @@ RUN git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /aufs && \
|
||||
git checkout -q "$AUFS_COMMIT"
|
||||
|
||||
# aufs-util 20151116
|
||||
ENV AUFS_TOOLS_REPO https://github.com/Distrotech/aufs-util.git
|
||||
ENV AUFS_TOOLS_COMMIT b5e7e204036da5e815ddec15a847a03c232771b4
|
||||
ENV AUFS_TOOLS_REPO https://github.com/ncopa/aufs-util.git
|
||||
ENV AUFS_TOOLS_COMMIT 3b7c5e262b53598a8204a915e485489c46d4e7a4
|
||||
|
||||
# Download aufs tools
|
||||
RUN git clone ${AUFS_TOOLS_REPO} && \
|
||||
@ -61,11 +61,10 @@ RUN cd /linux && \
|
||||
patch -p1 < "$patch"; \
|
||||
done
|
||||
|
||||
RUN jobs=$(nproc); \
|
||||
cd /linux && \
|
||||
RUN cd /linux && \
|
||||
make defconfig && \
|
||||
make oldconfig && \
|
||||
make -j ${jobs} && \
|
||||
make KCFLAGS="-fno-pie" && \
|
||||
make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||
( cd /tmp/kernel-modules && tar cf /kernel-modules.tar . ) && \
|
||||
make INSTALL_HDR_PATH=/tmp/kernel-headers headers_install
|
||||
@ -76,6 +75,6 @@ RUN cd /aufs-util && \
|
||||
CPPFLAGS="-I/tmp/kernel-headers/include" CFLAGS=$CPPFLAGS LDFLAGS=$CPPFLAGS make && \
|
||||
DESTDIR=/tmp/aufs-utils make install && \
|
||||
rm -rf /tmp/aufs-utils/usr/lib /tmp/aufs-utils/usr/share && \
|
||||
cd /tmp/aufs-utils && tar cf /aufs-utils.tar .
|
||||
cd /tmp/aufs-utils && rm libau* && tar cf /aufs-utils.tar .
|
||||
|
||||
RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\nAUFS_REPO=${AUFS_REPO}\nAUFS_BRANCH=${AUFS_BRANCH}\nAUFS_COMMIT=${AUFS_COMMIT}\nAUFS_TOOLS_REPO=${AUFS_TOOLS_REPO}\nAUFS_TOOLS_COMMIT=${AUFS_TOOLS_COMMIT}\n" > /kernel-source-info
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
|
||||
FROM mobylinux/alpine-build-c:50a89f207d5fc98ce750d694077c75a31ab7937d
|
||||
|
||||
COPY . /9pmount-vsock
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
|
||||
FROM mobylinux/alpine-build-c:50a89f207d5fc98ce750d694077c75a31ab7937d
|
||||
|
||||
COPY . /nc-vsock
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
|
||||
FROM mobylinux/alpine-build-c:50a89f207d5fc98ce750d694077c75a31ab7937d
|
||||
|
||||
COPY . /tap-vsockd
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
|
||||
FROM mobylinux/alpine-build-c:50a89f207d5fc98ce750d694077c75a31ab7937d
|
||||
|
||||
COPY . /transfused
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user