yosys/Dockerfile

52 lines
949 B
Docker
Raw Normal View History

ARG IMAGE="ubuntu:18.04"
#---
FROM $IMAGE AS base
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
ca-certificates \
libreadline-dev \
tcl-dev \
&& 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
clang \
bison \
build-essential \
2019-02-26 19:53:31 -06:00
flex \
gawk \
git \
libffi-dev \
2019-02-26 19:53:31 -06:00
pkg-config \
python3 \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists
2019-02-26 19:53:31 -06:00
COPY . /
RUN make \
&& make install \
&& mkdir dist && cp yosys yosys-abc yosys-config yosys-filterlib yosys-smtbmc dist/
2019-02-26 19:53:31 -06:00
#---
FROM base
2019-02-26 19:53:31 -06:00
COPY --from=build /dist /opt/yosys
ENV PATH /opt/yosys:$PATH
2019-02-26 19:53:31 -06:00
2019-03-01 19:06:43 -06:00
RUN useradd -m yosys
USER yosys
CMD ["yosys"]