Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
media build scripts container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Dufresne
media build scripts container
Commits
1be98e16
Commit
1be98e16
authored
1 year ago
by
Sebastian Fricke
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
container.sh
+33
-0
33 additions, 0 deletions
container.sh
prepare_kernel.sh
+6
-0
6 additions, 0 deletions
prepare_kernel.sh
with
39 additions
and
0 deletions
container.sh
0 → 100755
+
33
−
0
View file @
1be98e16
#!/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
This diff is collapsed.
Click to expand it.
prepare_kernel.sh
0 → 100755
+
6
−
0
View file @
1be98e16
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment