Code Monkey home page Code Monkey logo

emscripten-docker's Introduction

Emscripten dockerized

This image serves as convenient way how to have emscripten at hand without the need to build it for yourself, which takes a long time as you need to build clang from source.

See the docker hub for more details.

Versioning

The docker image version (tag) is the same as emscripten version so apiaryio/emcc:1.38.11 corresponds to emscripten version 1.38.11. Older images used to ignore the patch version but it we hit an issue along the way and started tagging even patch versions.

In the respective subdirectories you can find Dockerfiles for all emscripten versions ever built. Each of them is building the latest patch version.

Usage

Once pulled the usage is simple either invoke simple commands for interactive use

$> docker run --rm -v $(pwd):/src -t apiaryio/emcc emconfigure ./configure

or if working on non-trivial project have a build script run that, see the scripts directory in drafter.js repo.

$> docker run --rm -v $(pwd):/src -t apiaryio/emcc emcc/emcbuild.sh

Both examples assume you are in the root directory of your project where is your configure or Makefile.

Automated building of the images

To ease the maintenance there are few python 3 scripts to help and terraform settings.

emccbuild.py

This script updates and build the images automatically.

./emccbuild.py -h for usage

runit.py

This is a pexpect script which builds and pushes given versions on AWS EC2 instance. It utilizes terraform for the EC2 instance setup and teardown.

The script calls terraform and then over ssh runs docker login and emccbuild.py and if it finishes succesfully then it tears down the ec2 instance as well, making the whole process simple.

runit.py -h for usage

It needs a configuration file runitconfig.py to proceed. If it does not exists it will create a template so that you can just edit it and run it again.

Configuration (runitconfig.py)

aws_access = "<AWS ACCESS CODE>"
aws_secret = "<AWS SECRET>"
aws_instance_type = "c4.2xlarge"
aws_subnet_id = "<AWS SUBNET ID>"
key_name = "<AWS KEY NAME>"
ssh_key = "<PATH TO AWS KEY FILE>"
user = "<DOCKER USERNAME>"
passwd = "<DOCKER PASSWORD>"
email = "<DOCKER EMAIL>"

emscripten-docker's People

Contributors

janisozaur avatar jianrong-yu avatar kylef avatar mpapierski avatar w-vi avatar

Watchers

 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.