docker: Add Debian image with basic build environment

By running "./make.sh docker" the current build environment
will be mounted into a Debian-based docker container.

This clean build environment can be used to compile the
toolchain or something...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-11-23 19:47:02 +00:00
parent 000ece0135
commit 4e4327994d
2 changed files with 35 additions and 0 deletions

14
make.sh
View File

@@ -1768,6 +1768,20 @@ clean)
rm -f $BASEDIR/ipfire-*
print_status DONE
;;
docker)
# Build the docker image if it does not exist, yet
if ! docker images -a | grep -q ^ipfire-builder; then
if docker build -t ipfire-builder ${BASEDIR}/tools/docker; then
print_status DONE
else
print_status FAIL
exit 1
fi
fi
# Run the container and enter a shell
docker run -it --privileged -v "${BASEDIR}:/build" -w "/build" ipfire-builder bash -l
;;
downloadsrc)
if [ ! -d $BASEDIR/cache ]; then
mkdir $BASEDIR/cache