2019-08-07 07:24:09 -05:00
|
|
|
ARG IMAGE="python:3-slim-buster"
|
2019-07-01 07:50:15 -05:00
|
|
|
|
|
|
|
#---
|
|
|
|
|
|
|
|
FROM $IMAGE AS base
|
|
|
|
|
2019-07-01 06:21:16 -05:00
|
|
|
RUN apt-get update -qq \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
|
|
|
|
ca-certificates \
|
2019-08-07 07:24:09 -05:00
|
|
|
clang \
|
2024-07-22 14:33:46 -05:00
|
|
|
lld \
|
2019-08-07 07:24:09 -05:00
|
|
|
curl \
|
|
|
|
libffi-dev \
|
2019-07-01 07:50:15 -05:00
|
|
|
libreadline-dev \
|
|
|
|
tcl-dev \
|
2019-08-07 07:24:09 -05:00
|
|
|
graphviz \
|
|
|
|
xdot \
|
2019-07-01 07:50:15 -05:00
|
|
|
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
|
|
|
|
&& update-ca-certificates \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
|
|
|
|
|
|
|
#---
|
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
|
|
|
|
RUN apt-get update -qq \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
|
2019-02-26 19:53:31 -06:00
|
|
|
bison \
|
|
|
|
flex \
|
|
|
|
gawk \
|
2019-08-07 07:24:09 -05:00
|
|
|
gcc \
|
2019-02-26 19:53:31 -06:00
|
|
|
git \
|
2019-08-07 07:24:09 -05:00
|
|
|
iverilog \
|
2019-02-26 19:53:31 -06:00
|
|
|
pkg-config \
|
2019-07-01 06:21:16 -05:00
|
|
|
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
|
|
|
|
2019-08-06 22:37:00 -05:00
|
|
|
COPY . /yosys
|
2019-07-01 07:50:15 -05:00
|
|
|
|
2019-08-06 22:37:00 -05:00
|
|
|
ENV PREFIX /opt/yosys
|
|
|
|
|
|
|
|
RUN cd /yosys \
|
|
|
|
&& make \
|
2019-07-01 06:24:28 -05:00
|
|
|
&& make install \
|
2019-08-06 22:37:00 -05:00
|
|
|
&& make test
|
2019-02-26 19:53:31 -06:00
|
|
|
|
2019-07-01 07:50:15 -05:00
|
|
|
#---
|
|
|
|
|
|
|
|
FROM base
|
2019-02-26 19:53:31 -06:00
|
|
|
|
2019-08-06 22:37:00 -05:00
|
|
|
COPY --from=build /opt/yosys /opt/yosys
|
2019-07-01 07:50:15 -05:00
|
|
|
|
2019-08-06 22:37:00 -05:00
|
|
|
ENV PATH /opt/yosys/bin:$PATH
|
2019-02-26 19:53:31 -06:00
|
|
|
|
2019-03-01 19:06:43 -06:00
|
|
|
RUN useradd -m yosys
|
|
|
|
USER yosys
|
2019-07-01 07:50:15 -05:00
|
|
|
|
|
|
|
CMD ["yosys"]
|