github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/containers/compilers/rump/python3/Dockerfile.hw.no-stub (about)

     1  FROM projectunik/compilers-rump-go-hw:10b309685eb8ee0f
     2  
     3  RUN apt-get update
     4  RUN apt-get install -y libsqlite3-dev libssl-dev
     5  RUN mkdir -p /opt/python3
     6  RUN cd /opt/python3 && git clone https://github.com/rumpkernel/rumprun-packages
     7  RUN cd /opt/python3/rumprun-packages/python3 && \
     8      cp ../config.mk.dist ../config.mk && \
     9      perl -pi -e 's/RUMPRUN_TOOLCHAIN_TUPLE=/RUMPRUN_TOOLCHAIN_TUPLE=x86_64-rumprun-netbsd/g' ../config.mk && \
    10      sed -i '/\$(RUMPRUN_GENISOIMAGE) -o images\/python.iso build\/pythondist\/lib\/python3.5/d' Makefile && \
    11      export DESTDIR= && \
    12      make
    13  RUN mkdir -p /python/lib
    14  RUN cp -r /opt/python3/rumprun-packages/python3/build/pythondist/lib/python3.5 /python/lib/
    15  
    16  WORKDIR /opt
    17  
    18  ENV RUMP_BAKE=hw_generic
    19  
    20  RUN rumprun-bake $RUMP_BAKE /program.bin /opt/python3/rumprun-packages/python3/build/python
    21  
    22  COPY python-wrapper /build/python-wrapper/
    23  
    24  # RUN LIKE THIS: docker run --rm -v /path/to/code:/opt/code -e MAIN_FILE=main_file.js -e BOOTSTRAP_TYPE=ec2|udp projectunik/compilers-rump-python-hw
    25  CMD set -x && \
    26      (if [ -z "$MAIN_FILE" ]; then echo "Need to set MAIN_FILE"; exit 1; fi) && \
    27      cp /build/python-wrapper/python-wrapper-no-stub.py /opt/code/python-wrapper.py && \
    28      mkdir -p /opt/code/python/lib && \
    29      perl -pi -e 's/import main.py/import $ENV{MAIN_FILE}/g' /opt/code/python-wrapper.py && \
    30      cp -r /python/lib/* /opt/code/python/lib/ && \
    31      cp /program.bin /opt/code/program.bin