-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing request to move all into a dockerbuild directory
Signed-off-by: Josh Cox <[email protected]>
- Loading branch information
Showing
7 changed files
with
59 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
*.rpm | ||
*.log | ||
x86_64/* | ||
tmp/* | ||
output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.log | ||
tmp/* | ||
output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
# Build a vojtx image in a docker container | ||
|
||
OUTPUT=$(pwd)/dockerbuild/output | ||
TMP=$(pwd)/dockerbuild/tmp | ||
|
||
prepdir () { | ||
mkdir -p $1 | ||
chmod 777 $1 | ||
} | ||
|
||
if [ "$0" != "dockerbuild/build.sh" && "$0" != "./dockerbuild/build.sh" ]; then | ||
echo 'wrong usage! Please call from the vojtux root directory! e.g.' | ||
echo 'dockerbuild/build.sh' | ||
if [ -z "$1" ]; then | ||
exit 1 | ||
elif [ "$1" == '--force' ]; then | ||
echo 'using the force, soft fail' | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
set -eu | ||
prepdir $TMP | ||
prepdir $OUTPUT | ||
trap "rm -rf $TMP" EXIT | ||
|
||
if [ -f "dockerbuild/Dockerfile" ]; then | ||
docker build \ | ||
-t vojtux \ | ||
-f dockerbuild/Dockerfile \ | ||
./ | ||
else | ||
echo 'Dockerfile not found' | ||
exit 1 | ||
fi | ||
|
||
# we need priliged for the loopbacks and losetup to work | ||
# likewise /dev needs to be mounted in also for the loopbacks | ||
# but does not present to be a problem till after the squashfs runtime | ||
docker run \ | ||
--privileged=true \ | ||
-it --rm \ | ||
-v /dev:/dev \ | ||
-v $TMP:/live/tmp \ | ||
-v $OUTPUT:/output \ | ||
vojtux:latest | ||
|
||
sudo find $OUTPUT -name vojtux_38.iso |
File renamed without changes.