Dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ubuntu:20.04
  2. WORKDIR /wamr-test/tests/fuzz/wasm-mutator-fuzz/server
  3. COPY ./tests/fuzz/wasm-mutator-fuzz/server/requirements.txt /requirements.txt
  4. ARG proxy=""
  5. RUN if [ "$proxy" != "" ]; \
  6. then export http_proxy="$proxy" && export https_proxy="$proxy"; \
  7. else echo Do not set proxy; \
  8. fi
  9. ARG DEBIAN_FRONTEND=noninteractive
  10. ENV TZ=Asian/Shanghai
  11. # hadolint ignore=DL3008
  12. RUN apt-get -o Acquire::http::proxy="$proxy" update \
  13. && apt-get -o Acquire::http::proxy="$proxy" install \
  14. curl clang rustc cargo python3 python3-pip git \
  15. gcc build-essential cmake g++-multilib libunwind-dev \
  16. wget -y --no-install-recommends && rm -rf /var/lib/apt/lists/* \
  17. && pip install --no-cache-dir -U -r /requirements.txt --proxy=$proxy
  18. COPY ./tests/fuzz /wamr-test/tests/fuzz
  19. RUN if [ "$proxy" != "" ]; \
  20. then git config --global http.proxy $proxy && git config --global https.proxy $proxy; \
  21. else echo Do not set proxy for git; \
  22. fi
  23. WORKDIR /wamr-test/tests/fuzz/wasm-mutator-fuzz
  24. RUN wget --progress=dot:giga -e "https_proxy=$proxy" \
  25. https://github.com/bytecodealliance/wasm-tools/releases/download/v1.201.0/wasm-tools-1.201.0-x86_64-linux.tar.gz \
  26. && tar -xzf wasm-tools-1.201.0-x86_64-linux.tar.gz && mv wasm-tools-1.201.0-x86_64-linux wasm-tools
  27. ENV PATH="/wamr-test/tests/fuzz/wasm-mutator-fuzz/wasm-tools:$PATH"
  28. WORKDIR /wamr-test/tests/fuzz/wasm-mutator-fuzz/server/app
  29. # hadolint ignore=DL3025
  30. CMD nohup sh -c 'python3 main.py'