Skip to content

build: add build using docker #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:16.04
MAINTAINER Abhishek Munie <dev@abhishekmunie.com>

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
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <absolute-path-to-repo>:/root/swift-project1 -v <absolute-path-to-normal-swift3>:/root/swift -v <absolute-path-to-swift-kernel>:/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 <absolute-path-to-repo>:/root/swift-project1 abhishekmunie/swift-project1 make iso
```

To clean repository
```
$ docker run --rm -v <absolute-path-to-repo>:/root/swift-project1 abhishekmunie/swift-project1 make clean
```


Copyright (c) 2015 - 2017 Simon Evans

Expand Down