diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3cd0336 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:16.04 +MAINTAINER Abhishek Munie + +RUN apt-get -q update && \ + apt-get -q install -y \ + make \ + clang \ + libicu-dev \ + libxml2 \ + libcurl4-openssl-dev \ + nasm \ + git + +WORKDIR /root/swift-project1 + +CMD make diff --git a/README.md b/README.md index f87f393..16aa745 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,33 @@ $ make iso ![Screenshot](doc/screenshot.png) +## Build using Docker + +**Note: This method can be used to build with *Docker for Mac*** + +The docker image is based on ubuntu:16.04 and contains packages needed to build the repo. + +``` +$ docker run --rm -v :/root/swift-project1 -v :/root/swift -v :/root/swift-kernel-20170407 abhishekmunie/swift-project1 +``` + +To run under qemu with a copy of the console output being sent to a virtual +serial port use: +``` +$ qemu-system-x86_64 -hda output/boot-hd.img -serial stdio -D log -d int,cpu_reset,guest_errors,unimp -no-reboot +``` + +To build a .ISO image suitable for booting one from a USB stick, use the `iso` +target. This will also create a `kernel.efi` file that can be booted in GRUB +``` +$ docker run --rm -v :/root/swift-project1 abhishekmunie/swift-project1 make iso +``` + +To clean repository +``` +$ docker run --rm -v :/root/swift-project1 abhishekmunie/swift-project1 make clean +``` + Copyright (c) 2015 - 2017 Simon Evans