Dockerfile lint errors fix (#1493)

Fix the Dockerfile linter errors and most warnings
This commit is contained in:
TianlongLiang
2022-09-22 13:06:11 +08:00
committed by GitHub
parent ba3af0b196
commit ee210d019f
11 changed files with 102 additions and 191 deletions

View File

@ -10,12 +10,12 @@ WORKDIR /root/
COPY resource /root/
## - download cmake with wget and set up
RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
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 install make
&& apt-get -y install make --no-install-recommends
## set compilation environment for wamrc
# - wamr repo
@ -24,19 +24,20 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1
# - wamr-sdk
## - download wasi-sdk with wget and set up to /opt/wasi-sdk
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz \
RUN wget --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz \
&& tar -zxvf wasi-sdk-14.0-linux.tar.gz \
&& mv wasi-sdk-14.0 /opt/wasi-sdk/ \
&& rm -f wasi-sdk-14.0-linux.tar.gz
## - clone wamr repo
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
&& cd /root/wasm-micro-runtime/wamr-compiler \
&& ./build_llvm.sh \
&& cd /root/wasm-micro-runtime/wamr-compiler \
&& mkdir build \
&& cd build \
&& cmake .. \
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git
WORKDIR /root/wasm-micro-runtime/wamr-compiler
RUN ./build_llvm.sh \
&& mkdir build
WORKDIR /root/wasm-micro-runtime/wamr-compiler/build
RUN cmake .. \
&& make \
# - copy the wamrc to /root
&& cp /root/wasm-micro-runtime/wamr-compiler/build/wamrc /root/wamrc \
@ -65,6 +66,8 @@ COPY --from=BASE /root/build_wasm.sh ${HOME_DIR}
RUN ln -s /opt/cmake/bin/cmake /usr/bin/cmake \
&& ln -s ${HOME_DIR}/wamrc /usr/bin/wamrc
RUN apt-get update && apt-get install make
RUN apt-get update && apt-get install -y make --no-install-recommends \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR ${HOME_DIR}