-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into features/llvm
- Loading branch information
Showing
9 changed files
with
145 additions
and
35 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
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,13 @@ | ||
FROM ubuntu:19.04 | ||
|
||
ARG RUST_TOOLCHAIN="nightly" | ||
|
||
ENV CARGO_HOME=/usr/local/rust | ||
ENV RUSTUP_HOME=/usr/local/rust | ||
ENV PATH="$PATH:$CARGO_HOME/bin" | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install sudo strace curl cmake pkg-config python libssl-dev llvm-dev libz-dev gnuplot-nox \ | ||
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ | ||
&& echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ | ||
&& curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN" |
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,79 @@ | ||
#!/bin/bash | ||
|
||
# Wasmer build tool | ||
# | ||
# This is a script to build Wasmer in a Docker sandbox. | ||
# | ||
# To use the script, first make sure Docker is installed. Then build the | ||
# sandbox image with: | ||
# | ||
# docker build --file Dockerfile.build --tag wasmer-build . | ||
# | ||
# After the sandbox image is built successfully, you can run commands in it | ||
# with this script. | ||
# | ||
# For example, to build Wasmer, run: | ||
# | ||
# ./build make | ||
# | ||
# To test Wasmer, run: | ||
# | ||
# ./build make test | ||
# | ||
# and so on. | ||
|
||
docker_hostname="wasmer-build" | ||
|
||
docker_img="wasmer-build" | ||
|
||
docker_workdir="/wasmer" | ||
|
||
docker_args=( | ||
# | ||
# General config. | ||
# | ||
--hostname=${docker_hostname} | ||
--interactive | ||
--network=host | ||
--rm | ||
--tty | ||
|
||
# | ||
# User and group config. | ||
# | ||
# Use the same user and group permissions as host to make integration | ||
# between host and container simple. | ||
# | ||
--user "$(id --user):$(id --group)" | ||
--volume "/etc/group:/etc/group:ro" | ||
--volume "/etc/passwd:/etc/passwd:ro" | ||
--volume "/etc/shadow:/etc/shadow:ro" | ||
|
||
# | ||
# Time zone config. | ||
# | ||
# Use the same time zone as the host. | ||
# | ||
--volume "/etc/localtime:/etc/localtime:ro" | ||
|
||
# | ||
# Linux capabilities. | ||
# | ||
# Add SYS_PTRACE capability to the container so that people can run | ||
# `strace'. | ||
# | ||
--cap-add SYS_PTRACE | ||
|
||
# | ||
# Source directory. | ||
# | ||
--workdir=${docker_workdir} | ||
--volume "$(pwd):${docker_workdir}:z" | ||
|
||
# | ||
# Environment variables. | ||
# | ||
--env "CARGO_HOME=${docker_workdir}/.cargo" | ||
) | ||
|
||
docker run ${docker_args[@]} ${docker_img} $* |
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
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
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
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
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
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