Skip to content

Commit 0a7994a

Browse files
authored
wamr-ide: Modify Dockerfile to update base image version and fix build bug (#2068)
1 parent ff4be24 commit 0a7994a

3 files changed

Lines changed: 20 additions & 32 deletions

File tree

test-tools/wamr-ide/VSCode-Extension/src/utilities/lldbUtilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
downloadFile,
1313
unzipFile,
1414
} from './directoryUtilities';
15-
import { SelectionOfPrompt, Status } from '../constants';
15+
import { SelectionOfPrompt } from '../constants';
1616

1717
const LLDB_RESOURCE_DIR = 'resource/debug';
1818
const LLDB_OS_DOWNLOAD_URL_SUFFIX_MAP: Partial<

test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
# Copyright (C) 2019 Intel Corporation. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

4-
FROM gcc:9.3.0 AS BASE
4+
FROM gcc:12.2.0 AS BASE
55

66
## set work directory
77
WORKDIR /root/
88
COPY resource /root/
99

10-
## - download cmake with wget and set up
1110
# hadolint ignore=DL3008
12-
RUN wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
13-
&& tar -zxvf cmake-3.21.1-linux-x86_64.tar.gz \
14-
&& rm -f cmake-3.21.1-linux-x86_64.tar.gz \
15-
&& mv cmake-3.21.1-linux-x86_64 /opt/cmake \
16-
&& ln -s /opt/cmake/bin/cmake /bin/cmake \
17-
&& apt-get -y install make --no-install-recommends
11+
RUN apt-get update \
12+
&& apt-get -y install make cmake --no-install-recommends
1813

1914
## -clone wamr-repo and build iwasm
2015
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
21-
&& mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
16+
&& mkdir -p /root/wasm-micro-runtime/product-mini/platforms/linux/build
2217

23-
WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
24-
RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 && make \
18+
WORKDIR /root/wasm-micro-runtime/product-mini/platforms/linux/build
19+
RUN cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 \
20+
&& make \
2521
&& cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
2622
&& rm -fr /root/wasm-micro-runtime
2723

28-
FROM ubuntu:20.04
24+
FROM ubuntu:22.04
2925
# COPY files from BASE image
3026
COPY --from=BASE /root/iwasm /root
3127
COPY --from=BASE /root/debug.sh /root

test-tools/wamr-ide/WASM-Toolchain/Docker/Dockerfile

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,25 @@
22
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
## Build docker image that consists of gcc, cmake, wasi-sdk & zephyr sdk
5-
FROM gcc:9.3.0 AS BASE
5+
FROM gcc:12.2.0 AS BASE
66

77
## set work directory
88
WORKDIR /root/
99

1010
COPY resource /root/
1111

12-
## - download cmake with wget and set up
12+
# - download cmake with wget and set up
1313
# hadolint ignore=DL3008
14-
RUN wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
15-
&& tar -zxf cmake-3.21.1-linux-x86_64.tar.gz \
16-
&& rm -f cmake-3.21.1-linux-x86_64.tar.gz \
17-
&& mv cmake-3.21.1-linux-x86_64 /opt/cmake \
18-
&& ln -s /opt/cmake/bin/cmake /bin/cmake \
19-
&& apt-get -y install make --no-install-recommends
20-
21-
## set compilation environment for wamrc
14+
RUN apt-get update \
15+
&& apt-get -y install ccache ninja-build make cmake python3-pip --no-install-recommends
16+
17+
# set compilation environment for wamrc
2218
# - wamr repo
2319
# - cmake
2420
# - wasi-sdk
2521
# - wamr-sdk
2622

27-
## - download wasi-sdk with wget and set up to /opt/wasi-sdk
23+
# - download wasi-sdk with wget and set up to /opt/wasi-sdk
2824
RUN wget --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz \
2925
&& tar -zxf wasi-sdk-*-linux.tar.gz \
3026
&& mv wasi-sdk-19.0 /opt/wasi-sdk/ \
@@ -34,8 +30,7 @@ RUN wget --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/do
3430
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git
3531

3632
WORKDIR /root/wasm-micro-runtime/build-scripts
37-
RUN apt-get update && apt-get install --no-install-recommends -y ccache ninja-build python3-pip
38-
RUN pip3 install --user -r requirements.txt
33+
RUN pip3 install --no-cache-dir --user -r requirements.txt
3934

4035
WORKDIR /root/wasm-micro-runtime/wamr-compiler
4136
RUN ./build_llvm.sh \
@@ -53,26 +48,23 @@ RUN cmake .. \
5348
&& rm -fr /root/wasm-micro-runtime
5449

5550
# ## STAGE 2
56-
FROM ubuntu:20.04
51+
FROM ubuntu:22.04
5752
ENV HOME_DIR=/home/wasm-toolchain
5853

5954
RUN mkdir -p /opt/wasi-sdk \
60-
&& mkdir -p /opt/cmake \
6155
&& mkdir -p /opt/wamr-sdk/app \
6256
&& mkdir -p /home/wasm-toolchain
6357

6458
# COPY files from BASE image
65-
COPY --from=BASE /opt/cmake/ /opt/cmake/
6659
COPY --from=BASE /opt/wamr-sdk/app/ /opt/wamr-sdk/app/
6760
COPY --from=BASE /opt/wasi-sdk /opt/wasi-sdk/
6861
COPY --from=BASE /root/wamrc ${HOME_DIR}
6962
COPY --from=BASE /root/build_wasm.sh ${HOME_DIR}
7063

71-
RUN ln -s /opt/cmake/bin/cmake /usr/bin/cmake \
72-
&& ln -s ${HOME_DIR}/wamrc /usr/bin/wamrc
64+
RUN ln -s ${HOME_DIR}/wamrc /usr/bin/wamrc
7365

7466
# hadolint ignore=DL3008
75-
RUN apt-get update && apt-get install -y make --no-install-recommends \
67+
RUN apt-get update && apt-get install -y cmake make --no-install-recommends \
7668
&& apt-get clean -y \
7769
&& rm -rf /var/lib/apt/lists/*
7870

0 commit comments

Comments
 (0)