-
-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker files to help setup OSv build environment for Ubuntu/Fedora
Signed-off-by: Waldemar Kozaczuk <[email protected]>
- Loading branch information
Showing
6 changed files
with
177 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile.Fedora |
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,51 @@ | ||
# | ||
# Copyright (C) 2017 XLAB, Ltd. | ||
# Copyright (C) 2018 Waldemar Kozaczuk | ||
# | ||
# This work is open source software, licensed under the terms of the | ||
# BSD license as described in the LICENSE file in the top-level directory. | ||
# | ||
# This Docker file defines a container intended to build, test and publish | ||
# OSv kernel as well as many applications ... | ||
# | ||
#FROM fedora:27 #On Jenkins build machine | ||
FROM fedora:29 | ||
|
||
RUN yum install -y git python2 file which | ||
|
||
# | ||
# PREPARE ENVIRONMENT | ||
# | ||
|
||
# - prepare directories | ||
RUN mkdir /git-repos /result | ||
|
||
# - clone OSv | ||
WORKDIR /git-repos | ||
RUN git clone https://github.com/cloudius-systems/osv.git | ||
WORKDIR /git-repos/osv | ||
RUN git submodule update --init --recursive | ||
|
||
# - install all required packages | ||
RUN scripts/setup.py | ||
|
||
# - install Capstan | ||
RUN wget https://github.com/cloudius-systems/capstan/releases/latest/download/capstan -O /usr/local/bin/capstan | ||
RUN chmod u+x /usr/local/bin/capstan | ||
|
||
CMD /bin/bash | ||
|
||
# | ||
# NOTES | ||
# | ||
# Build the container example: | ||
# docker build -t osv/builder-fedora -f Dockerfile.Fedora . | ||
# | ||
# Run the container FIRST time example: | ||
# docker run -it --privileged osv/builder-fedora | ||
# | ||
# To restart: | ||
# docker restart ID (from docker ps -a) && docker attach ID | ||
# | ||
# To open in another console | ||
# docker exec -it ID /bin/bash |
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,58 @@ | ||
# | ||
# Copyright (C) 2017 XLAB, Ltd. | ||
# Copyright (C) 2018 Waldemar Kozaczuk | ||
# | ||
# This work is open source software, licensed under the terms of the | ||
# BSD license as described in the LICENSE file in the top-level directory. | ||
# | ||
# This Docker file defines a container intended to build, test and publish | ||
# OSv kernel as well as many applications ... | ||
# | ||
FROM ubuntu:19.04 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV TERM=linux | ||
|
||
COPY ./etc/keyboard /etc/default/keyboard | ||
COPY ./etc/console-setup /etc/default/console-setup | ||
|
||
RUN apt-get update -y && apt-get install -y git python2 | ||
|
||
# | ||
# PREPARE ENVIRONMENT | ||
# | ||
|
||
# - prepare directories | ||
RUN mkdir /git-repos /result | ||
|
||
# - clone OSv | ||
WORKDIR /git-repos | ||
RUN git clone https://github.com/cloudius-systems/osv.git | ||
WORKDIR /git-repos/osv | ||
RUN git submodule update --init --recursive | ||
|
||
# - install all required packages | ||
RUN scripts/setup.py | ||
|
||
RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java | ||
|
||
# - install Capstan | ||
RUN wget https://github.com/cloudius-systems/capstan/releases/latest/download/capstan -O /usr/local/bin/capstan | ||
RUN chmod u+x /usr/local/bin/capstan | ||
|
||
CMD /bin/bash | ||
|
||
# | ||
# NOTES | ||
# | ||
# Build the container example: | ||
# docker build -t osv/builder-ubuntu -f Dockerfile.Ubuntu . | ||
# | ||
# Run the container FIRST time example: | ||
# docker run -it --privileged osv/builder-ubuntu | ||
# | ||
# To restart: | ||
# docker restart ID (from docker ps -a) && docker attach ID | ||
# | ||
# To open in another console: | ||
# docker exec -it ID /bin/bash |
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,41 @@ | ||
# Docker OSv builder | ||
Docker files intended to help setup OSv build environment. | ||
There are two versions of it - one based on Ubuntu and another on Fedora. | ||
|
||
Build container image | ||
``` | ||
docker build -t osv/builder . # Use default Fedora-base file | ||
docker build -t osv/builder -f Dockerfile.Ubuntu . # Use specific docker file | ||
``` | ||
|
||
Run container | ||
``` | ||
docker run -it --privileged osv/builder | ||
``` | ||
|
||
After starting you will end up in /git-repos/osv directory | ||
where you can build OSv kernel and example app like so: | ||
```bash | ||
./scripts/build image=native-example | ||
``` | ||
|
||
To run it: | ||
```bash | ||
./scripts/run.py | ||
``` | ||
|
||
Run this to learn all kinds of options the build and run.py script accepts: | ||
```bash | ||
./scripts/build --help | ||
./scripts/run.py --help | ||
``` | ||
|
||
To refresh OSv code the latest version run this in /git-repos/osv directory: | ||
```bash | ||
git pull | ||
``` | ||
|
||
To update Fedora/Ubuntu packages run this in /git-repos/osv directory: | ||
```bash | ||
./script/setup.py | ||
``` |
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,16 @@ | ||
# CONFIGURATION FILE FOR SETUPCON | ||
|
||
# Consult the console-setup(5) manual page. | ||
|
||
ACTIVE_CONSOLES="/dev/tty[1-6]" | ||
|
||
CHARMAP="UTF-8" | ||
|
||
CODESET="guess" | ||
FONTFACE="Fixed" | ||
FONTSIZE="8x16" | ||
|
||
VIDEOMODE= | ||
|
||
# The following is an example how to use a braille font | ||
# FONT='lat9w-08.psf.gz brl-8x8.psf' |
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,10 @@ | ||
# KEYBOARD CONFIGURATION FILE | ||
|
||
# Consult the keyboard(5) manual page. | ||
|
||
XKBMODEL="pc105" | ||
XKBLAYOUT="us" | ||
XKBVARIANT="" | ||
XKBOPTIONS="" | ||
|
||
BACKSPACE="guess" |