FROM ubuntu:22.04
ARG VERSION

RUN apt-get update && apt-get install -y netbase
ADD WasmEdge-$VERSION-Linux.tar.gz /tmp/
RUN cp -rf /tmp/WasmEdge-$VERSION-Linux/bin/* /usr/local/bin && \
    cp -rf /tmp/WasmEdge-$VERSION-Linux/lib64/* /usr/local/lib && \
    cp -rf /tmp/WasmEdge-$VERSION-Linux/include/* /usr/local/include && \
    ldconfig /usr/local/lib
RUN rm -rf /tmp/WasmEdge-$VERSION-Linux

WORKDIR /app
CMD ["/usr/local/bin/wasmedge"]
