FROM rust:1.63.0-bullseye as dobuilder ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get upgrade -y RUN apt-get -qq -y install bash curl git coreutils llvm clang WORKDIR /opt ENV VERSION=0.10.1 RUN curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh -o install.sh RUN bash install.sh -- -e all --version=$VERSION --tf-version=$VERSION --tf-deps-version=$VERSION --tf-tools-version=$VERSION --image-version=$VERSION --image-deps-version=$VERSION -p /root/.wasmedge RUN USER=root cargo new --bin gdo-runner WORKDIR /opt/gdo-builder COPY ./Cargo.lock ./Cargo.lock COPY ./Cargo.toml ./Cargo.toml RUN mkdir ./src RUN touch ./src/lib.rs RUN cargo build --release --locked RUN rm ./src/*.rs ./target/release/deps/*gdo?runner* ADD ./languages ./languages ADD ./src ./src RUN cargo build --release FROM debian:buster RUN apt-get update && \ apt-get upgrade -y RUN apt-get -qq -y install bash curl git coreutils llvm clang WORKDIR /opt ENV VERSION=0.10.1 RUN curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh -o install.sh RUN bash install.sh -- -e all --version=$VERSION --tf-version=$VERSION --tf-deps-version=$VERSION --tf-tools-version=$VERSION --image-version=$VERSION --image-deps-version=$VERSION -p /root/.wasmedge WORKDIR / COPY --from=dobuilder /opt/gdo-builder/target/release/gdo-runner . EXPOSE 8076 CMD ["/gdo-runner"]