2016-11-30 13:20:26 +00:00
|
|
|
#Pull in previously built packages image with lots of libraries.
|
|
|
|
FROM packages
|
|
|
|
|
|
|
|
# Prepare directories
|
|
|
|
RUN mkdir /code
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
# Copy repository files
|
|
|
|
COPY ccd_defs_check.py /code/ccd_defs_check.py
|
|
|
|
COPY CMakeLists.txt /code/CMakeLists.txt
|
|
|
|
COPY configure.sh /code/configure.sh
|
|
|
|
COPY /.git/ /code/.git/
|
|
|
|
COPY .gitignore /code/.gitignore
|
|
|
|
COPY .gitmodules /code/.gitmodules
|
|
|
|
COPY /modules/ /code/modules/
|
|
|
|
COPY /opendm/ /code/opendm/
|
|
|
|
COPY /patched_files/ /code/patched_files/
|
|
|
|
COPY run.py /code/run.py
|
|
|
|
COPY /scripts/ /code/scripts/
|
|
|
|
COPY /SuperBuild/cmake/ /code/SuperBuild/cmake/
|
|
|
|
COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
|
2017-03-30 14:16:24 +00:00
|
|
|
COPY docker.settings.yaml /code/settings.yaml
|
2016-11-30 13:20:26 +00:00
|
|
|
COPY /tests/ /code/tests/
|
2017-03-30 18:27:14 +00:00
|
|
|
COPY VERSION /code/VERSION
|
2016-11-30 13:20:26 +00:00
|
|
|
|
|
|
|
# Update submodules
|
|
|
|
RUN git submodule init && git submodule update
|
|
|
|
|
|
|
|
# Replace g++ and gcc with our own scripts
|
|
|
|
COPY /docker/ /code/docker/
|
|
|
|
RUN mv -v /usr/bin/gcc /usr/bin/gcc_real && mv -v /usr/bin/g++ /usr/bin/g++_real && cp -v /code/docker/gcc /usr/bin/gcc && cp -v /code/docker/g++ /usr/bin/g++
|
|
|
|
|
|
|
|
#Compile code in SuperBuild and root directories
|
|
|
|
RUN cd SuperBuild && mkdir build && cd build && cmake .. && make -j$(nproc) \
|
|
|
|
&& cd ../.. && mkdir build && cd build && cmake .. && make -j$(nproc)
|
|
|
|
|
|
|
|
# Entry point
|
2017-03-30 14:16:24 +00:00
|
|
|
ENTRYPOINT ["python", "/code/run.py", "code"]
|