forked from sagemathinc/cowasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (25 loc) · 1021 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Dockerfile for building CoWasm in a predictable way.
# The goal is that this fully work on both x86_64 and aarch64 hosts,
# and results in /cowasm having everything built with
# the test suite passing.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 LC_ALL=C.UTF-8
LABEL maintainer="William Stein <wstein@sagemath.com>"
USER root
# Required apt dependencies -- mainly tools for compiling code.
RUN apt-get update \
&& apt-get install -y git make cmake curl dpkg-dev m4 yasm texinfo python-is-python3 libtool tcl zip libncurses-dev
# Install nodejs and pnpm
RUN \
curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm pnpm
# Get source code of python-wasm and build everything:
ARG commit=HEAD
RUN git clone https://github.com/sagemathinc/cowasm \
&& cd cowasm \
&& git checkout ${commit:-HEAD} \
&& make
RUN echo "export PATH=/python-wasm/bin/:$PATH" >> /root/.bashrc
# Run the test suite:
RUN cd cowasm && make test