Code Monkey home page Code Monkey logo

osv-apps's Introduction

OSv Applications

Introduction

OSv has been designed to implement subset of Linux ABI to allow running single Linux application. However in its earlier days OSv could not run Linux binaries "as is" due to some limitations in its dynamic linker, kernel memory placement and other bugs. Fairly recently most of these problems have been addressed and now it is possible to run many completely unmodified Linux binaries like Java, Node.JS, Python 2 and 3, iperf 3, etc.

This repository contains the necessary glue to build many applications for OSv. Most of the C apps get built as a shared library, but given what is written in the paragraph above, these days it should be possible in most cases to run the same Linux application from host as is unless some patch is necessary.

Each of the subdirectories here does NOT contain the original application code. This makes this repository very small, and free of license issues. Rather for each application this repository contains a script "GET" to fetch this code from the Internet, patch it (if required) to run on OSv, a Makefile to compile it for OSv (if compilation is required), and a manifest of which files from the application should be copied into the OSv image.

Please note that some of the apps contain Capstanfile which means that the app can alse be built using capstan.

How to use

Each one of the subdirectories in this repository is an application or a "runtime" (JRE, Python or Node runtime). In order to build any of the apps, one would clone full OSv repo that links this repo automatically as its child under /apps subfolder. Please see the main OSv page for details on how to setup OSv development environment.

The simplest app is the native-example and it can be built and run on OSv like so:

# In the main OSv directory, run this to build the image:
./scripts/build image=native-example # This compiles OSv kernel and native-example app 
# and fuses all into an image located at ./buid/release/usr.img
#
# Run this to run the image
./scripts/run.py # This always runs the latest built image

If you want to build and run any JVM app (Java, Scala, Kotlin, Clojure), you would do something similar:

./scripts/build image=openjdk8-zulu-full,java-example # Please run ./scripts/build --help for more information
./scripts/run.py

Please note that openjdk8-zulu-full can be replaced with any other "Java runtime" app from this repo (see other openjdk* apps). It may seem that we are building two apps to run on OSv, but in reality the files from both openjdk8-zulu-full (JRE binaries) and java-example (Java *.class files) are overlaid on top of each other to fuse single image just like with Docker images.

Linux applications from host

Please note the apps whose name ends with -from-host, are the latest addition to demo creating images out of native Linux images from host.

osv-apps's People

Contributors

nyh avatar wkozaczuk avatar syuu1228 avatar geraldo-netto avatar tgrabiec avatar asias avatar avikivity avatar pshem avatar bhuztez avatar abn avatar justinc1 avatar cosmo0920 avatar slivne avatar davedoesdev avatar penberg avatar russt avatar dvoytik avatar tzach avatar dfj avatar foxeng avatar rickpayne avatar jxwr avatar glauciom avatar btbytes avatar nivertech avatar viniciusmsfraga avatar fukai-t avatar raphaelsc avatar leematos avatar jmmlmendes avatar

Watchers

 avatar KANATSU Minoru avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.