mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
fix licensing container to fix #70
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
8a8045e03d
commit
ae084196bc
@ -1,6 +1,6 @@
|
||||
FROM alpine:3.3
|
||||
|
||||
RUN apk update && apk add lua git
|
||||
RUN apk update && apk add lua git bash
|
||||
|
||||
RUN git clone https://github.com/alpinelinux/aports.git
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
fail() {
|
||||
printf $1
|
||||
printf "\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
cat /hostetc/issue | grep -q Moby || ( printf "You must run this script with -v /etc:/hostetc -v /lib:/lib\n" && exit 1 )
|
||||
|
||||
@ -10,22 +16,6 @@ apk info | grep -q fuse || ( printf "You must run this script with -v /etc:/etc
|
||||
|
||||
rm -rf /output/*
|
||||
|
||||
mkdir -p /output/kernel
|
||||
cd /output/kernel
|
||||
cp /proc/config.gz .
|
||||
wget ${KERNEL_SOURCE=} || ( printf "Failed to download kernel source\n" && exit 1 )
|
||||
|
||||
git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /output/kernel/aufs
|
||||
cd /output/kernel/aufs
|
||||
git checkout -q "$AUFS_COMMIT"
|
||||
# to make it easier to check in the output of this script if necessary
|
||||
rm -rf .git
|
||||
|
||||
git clone ${AUFS_TOOLS_REPO} /output/aufs-util
|
||||
cd /output/aufs-util
|
||||
git checkout "$AUFS_TOOLS_COMMIT"
|
||||
rm -rf .git
|
||||
|
||||
cd /aports
|
||||
git pull
|
||||
|
||||
@ -45,17 +35,40 @@ do
|
||||
if [ ! -d "$srcdir"/$pkgname-$pkgver ]
|
||||
then
|
||||
mkdir -p "$srcdir"/$pkgname-$pkgver
|
||||
for f in $source
|
||||
while read f
|
||||
do
|
||||
if [ -f $f ]
|
||||
then
|
||||
cp -a $f "$srcdir"/$pkgname-$pkgver/
|
||||
else
|
||||
cd "$srcdir"/$pkgname-$pkgver && \
|
||||
wget $f || ( printf "Cannot retrieve $f\n" && exit ) && \
|
||||
cd -
|
||||
fi
|
||||
done
|
||||
if [ -n "$(echo $f | tr -d '[[:space:]]')" ]
|
||||
then
|
||||
f=$(echo $f | sed 's/^.*:://')
|
||||
printf "looking for source for: $f\n"
|
||||
if [ -f $f ]
|
||||
then
|
||||
cp -a $f "$srcdir"/$pkgname-$pkgver/
|
||||
else
|
||||
cd "$srcdir"/$pkgname-$pkgver && \
|
||||
wget $f || fail "Cannot retrieve $f" && \
|
||||
cd -
|
||||
fi
|
||||
fi
|
||||
done <<< "$source"
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
mkdir -p /output/kernel
|
||||
cd /output/kernel
|
||||
cp /proc/config.gz .
|
||||
wget ${KERNEL_SOURCE=} || ( printf "Failed to download kernel source\n" && exit 1 )
|
||||
|
||||
git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /output/kernel/aufs
|
||||
cd /output/kernel/aufs
|
||||
git checkout -q "$AUFS_COMMIT"
|
||||
# to make it easier to check in the output of this script if necessary
|
||||
rm -rf .git
|
||||
|
||||
git clone ${AUFS_TOOLS_REPO} /output/aufs-util
|
||||
cd /output/aufs-util
|
||||
git checkout "$AUFS_TOOLS_COMMIT"
|
||||
rm -rf .git
|
||||
|
||||
printf "All source code now in output/ directory\n'
|
||||
|
Loading…
Reference in New Issue
Block a user