Skip to content
Snippets Groups Projects
Commit 1be98e16 authored by Sebastian Fricke's avatar Sebastian Fricke
Browse files

Store kernel locally to slim down the image, add script to run container

parent 5f19736f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
IMAGE_TAG="$(date +"%Y-%m-%d")_media_build"
case "$1" in
run)
if [ ! "$2" ]; then
echo "Usage: $0 run IMAGE_TAG"
exit 1
fi
docker run -it \
--mount type=bind,source="$(pwd)"/custom_data/env.sh,destination=/build-scripts/env.sh,readonly \
--mount type=bind,source="$(pwd)"/kernel,destination=/build-scripts/media-git \
"$2" \
/bin/bash
;;
build)
mkdir -p custom_data
cat > custom_data/env.sh << EOF
myrepo=git://linuxtv.org/hverkuil/media_tree.git
name="Example Name"
email="example@mail.com"
EOF
if [ ! -d kernel ]; then
./prepare_kernel.sh
fi
docker build -t $IMAGE_TAG .
;;
*)
echo "Usage: $0 {run IMAGE_TAG|build}"
exit 1
esac
#!/bin/bash
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git kernel
cd kernel
git remote add media_tree git://linuxtv.org/media_tree.git
git remote add media_stage git://linuxtv.org/media_stage.git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment