From 0a94441579f25f3661071692d2290c5c3b224a6a Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Tue, 26 Feb 2019 20:53:31 -0500 Subject: dockerize yosys --- Dockerfile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..3a4358335 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,47 @@ +FROM ubuntu:16.04 as builder +LABEL author="Abdelrahman Hosny " + +RUN apt-get update && apt-get install -y build-essential \ + clang \ + bison \ + flex \ + libreadline-dev \ + gawk \ + tcl-dev \ + libffi-dev \ + git \ + graphviz \ + xdot \ + pkg-config \ + python3 + +COPY . / +RUN make && \ + make install + + +FROM ubuntu:16.04 +RUN apt-get update && apt-get install -y clang \ + bison \ + flex \ + libreadline-dev \ + gawk \ + tcl-dev \ + libffi-dev \ + git \ + graphviz \ + xdot \ + pkg-config \ + python3 +COPY --from=builder /yosys /build/yosys +COPY --from=builder /yosys-abc /build/yosys-abc +COPY --from=builder /yosys-config /build/yosys-config +COPY --from=builder /yosys-filterlib /build/yosys-filterlib +COPY --from=builder /yosys-smtbmc /build/yosys-smtbmc + +ENV PATH /build:$PATH + +RUN mkdir /data +WORKDIR /data + +ENTRYPOINT ["yosys"] -- cgit v1.2.3 From 3e3b115e0f3c9f0f9a37884cd3449bfbecfdc9f6 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Tue, 26 Feb 2019 21:02:02 -0500 Subject: add dockerignore file --- .dockerignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..9910e9954 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +.editorconfig +.gitignore +.gitmodules +.github +.git +Dockerfile +README.md +manual +CodingReadme +CodeOfConduct +.travis +.travis.yml + -- cgit v1.2.3 From ed358b237b597f2198c6e354e7c4084faf769d3a Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Fri, 1 Mar 2019 20:06:43 -0500 Subject: address review comments --- Dockerfile | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a4358335..3c7188d82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM ubuntu:16.04 as builder +FROM ubuntu:18.04 as builder LABEL author="Abdelrahman Hosny " - +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y build-essential \ clang \ bison \ @@ -10,29 +10,17 @@ RUN apt-get update && apt-get install -y build-essential \ tcl-dev \ libffi-dev \ git \ - graphviz \ - xdot \ pkg-config \ - python3 - + python3 && \ + rm -rf /var/lib/apt/lists COPY . / RUN make && \ make install +FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y libreadline-dev tcl-dev -FROM ubuntu:16.04 -RUN apt-get update && apt-get install -y clang \ - bison \ - flex \ - libreadline-dev \ - gawk \ - tcl-dev \ - libffi-dev \ - git \ - graphviz \ - xdot \ - pkg-config \ - python3 COPY --from=builder /yosys /build/yosys COPY --from=builder /yosys-abc /build/yosys-abc COPY --from=builder /yosys-config /build/yosys-config @@ -40,8 +28,6 @@ COPY --from=builder /yosys-filterlib /build/yosys-filterlib COPY --from=builder /yosys-smtbmc /build/yosys-smtbmc ENV PATH /build:$PATH - -RUN mkdir /data -WORKDIR /data - +RUN useradd -m yosys +USER yosys ENTRYPOINT ["yosys"] -- cgit v1.2.3