This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
39 lines (32 loc) · 1.84 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM centos:centos6 AS builder
# install gcc 6
RUN yum -y install centos-release-scl && \
yum -y install devtoolset-6 devtoolset-6-libatomic-devel
ENV CC=/opt/rh/devtoolset-6/root/usr/bin/gcc \
CPP=/opt/rh/devtoolset-6/root/usr/bin/cpp \
CXX=/opt/rh/devtoolset-6/root/usr/bin/g++ \
PATH=/opt/rh/devtoolset-6/root/usr/bin:$PATH \
LD_LIBRARY_PATH=/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib:/opt/rh/devtoolset-6/root/usr/lib64/dyninst:/opt/rh/devtoolset-6/root/usr/lib/dyninst:/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib:$LD_LIBRARY_PATH
# install dependencies
RUN yum install -y wget git zlib-devel tcl-devel tk-devel swig bison flex
# install newer version of boost
RUN yum install -y wget rh-mongodb32-boost-devel rh-mongodb32-boost-static
ENV PATH=/opt/rh/rh-mongodb32/root/usr/bin:$PATH \
LD_LIBRARY_PATH=/opt/rh/rh-mongodb32/root/usr/lib64:/opt/rh/rh-mongodb32/root/usr/lib:/opt/rh/rh-mongodb32/root/usr/lib64/dyninst:/opt/rh/rh-mongodb32/root/usr/lib/dyninst:/opt/rh/rh-mongodb32/root/usr/lib64:/opt/rh/rh-mongodb32/root/usr/lib:$LD_LIBRARY_PATH \
C_INCLUDE_PATH=/opt/rh/rh-mongodb32/root/usr/include \
CPLUS_INCLUDE_PATH=/opt/rh/rh-mongodb32/root/usr/include
# Installing cmake for build dependency
RUN wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh && \
chmod +x cmake-3.9.0-Linux-x86_64.sh && \
./cmake-3.9.0-Linux-x86_64.sh --skip-license --prefix=/usr/local
COPY . /TritonMacroPlace
RUN mkdir /TritonMacroPlace/build
WORKDIR /TritonMacroPlace/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/build -DBOOST_ROOT=/opt/rh/rh-mongodb32/root/usr ..
RUN make
FROM centos:centos6 AS runner
RUN yum update -y && yum install -y tcl-devel
COPY --from=builder /TritonMacroPlace/build/mplace /build/mplace
RUN useradd -ms /bin/bash openroad
USER openroad
WORKDIR /home/openroad