@@ -30,23 +30,44 @@ RUN apt update -qq \
3030RUN git clone --depth 1 https://github.com/ghdl/ghdl \
3131 && mkdir ghdl/build && cd ghdl/build \
3232 && ../configure --prefix=/usr/local \
33- && make -j$(nproc) && make install \
34- && cd /root && rm -fr ghdl
33+ && make -j$(nproc) && make install
3534
3635#
3736# Yosys
3837#
3938
4039RUN git clone --depth 1 https://github.com/YosysHQ/yosys \
4140 && cd yosys && git submodule update --init \
42- && make -j$(nproc) && make install \
43- && cd /root && rm -fr yosys
41+ && make -j$(nproc) && make install
4442
4543#
4644# ghdl-yosys-plugin
4745#
4846
4947RUN git clone --depth 1 https://github.com/ghdl/ghdl-yosys-plugin.git \
5048 && cd ghdl-yosys-plugin && git submodule update --init \
51- && make -j$(nproc) && make install \
52- && cd /root && rm -fr ghdl-yosys-plugin
49+ && make -j$(nproc) && make install
50+
51+ #
52+ # Clean-up
53+ #
54+
55+ RUN cd /usr/local/lib && rm -fr libghdlvpi.so libghw.so python3.11 \
56+ && cd /usr/local/bin && rm ghwdump yosys-filterlib yosys-smtbmc yosys-witness
57+
58+ ###############################################################################
59+
60+ FROM ubuntu:latest
61+ #gcr.io/distroless/static-debian12
62+
63+ RUN apt update -qq \
64+ && DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
65+ libreadline-dev \
66+ tcl-dev \
67+ && apt autoclean && apt clean && apt -y autoremove \
68+ && rm -rf /var/lib/apt/lists/*
69+
70+ COPY --from=build /usr/local/bin /usr/local/bin
71+ COPY --from=build /usr/local/lib /usr/local/lib
72+ COPY --from=build /usr/local/include/ghdl /usr/local/include/ghdl
73+ COPY --from=build /usr/local/share/yosys /usr/local/share/yosys
0 commit comments