wamr-ide: Modify Dockerfile to update base image version and fix build bug (#2068)

This commit is contained in:
Wang Ning
2023-03-28 14:21:32 +08:00
committed by GitHub
parent ff4be24726
commit 0a7994ac0a
3 changed files with 19 additions and 31 deletions

View File

@ -1,31 +1,27 @@
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
FROM gcc:9.3.0 AS BASE
FROM gcc:12.2.0 AS BASE
## set work directory
WORKDIR /root/
COPY resource /root/
## - download cmake with wget and set up
# hadolint ignore=DL3008
RUN wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
&& tar -zxvf cmake-3.21.1-linux-x86_64.tar.gz \
&& rm -f cmake-3.21.1-linux-x86_64.tar.gz \
&& mv cmake-3.21.1-linux-x86_64 /opt/cmake \
&& ln -s /opt/cmake/bin/cmake /bin/cmake \
&& apt-get -y install make --no-install-recommends
RUN apt-get update \
&& apt-get -y install make cmake --no-install-recommends
## -clone wamr-repo and build iwasm
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
&& mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
&& mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 && make \
WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 \
&& make \
&& cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
&& rm -fr /root/wasm-micro-runtime
FROM ubuntu:20.04
FROM ubuntu:22.04
# COPY files from BASE image
COPY --from=BASE /root/iwasm /root
COPY --from=BASE /root/debug.sh /root