Skip to content

Commit

Permalink
added some work in progress docker files to test build on other linux…
Browse files Browse the repository at this point in the history
… distros
  • Loading branch information
jmacey committed Jun 13, 2023
1 parent 2a2843b commit 8a104f3
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Dockerfiles/Alma/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#set the base image
FROM almalinux:latest
# install tools
RUN dnf -y groupinstall "Development Tools" && \
dnf -y --enablerepo=crb install g++ wget vim ninja-build \
mesa-libGL-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel openssl-devel



WORKDIR /home/ncca
ENV HOME /home/ncca
ENV PATH=$PATH:/usr/local/bin
# the cmake version in the repo is too old for vcpkg!
RUN wget https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2.tar.gz && \
tar -zxvf cmake-3.23.2.tar.gz && \
cd cmake-3.23.2 && \
./bootstrap && \
make && make install

# download and install vcpkg


RUN git clone https://github.com/Microsoft/vcpkg.git ~/vcpkg && \
cd ~/vcpkg && \
./bootstrap-vcpkg.sh

RUN VCPKG_FORCE_SYSTEM_BINARIES=1 /home/ncca/vcpkg/vcpkg install gtest glm \
gl3w glfw3 rapidjson rapidxml fmt freetype openimageio

RUN git clone --depth 1 https://github.com:/NCCA/NGL ~/NGLBuild && \
cd ~/NGLBuild/ && \
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -G Ninja -B build -S . &&\
cd build && cmake --build .
RUN cd ~/NGLBuild/build && ./NGLTests -g
# set default command
ENTRYPOINT ["/bin/bash"]
26 changes: 26 additions & 0 deletions Dockerfiles/Fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#set the base image
FROM fedora:latest
# install tools
RUN dnf -y groupinstall "Development Tools" && \
dnf -y install g++ wget vim cmake ninja-build && \
dnf -y install mesa-libGL-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel



WORKDIR /home/ncca
ENV HOME /home/ncca
# download and install vcpkg
RUN git clone https://github.com/Microsoft/vcpkg.git ~/vcpkg && \
cd ~/vcpkg && \
./bootstrap-vcpkg.sh

RUN VCPKG_FORCE_SYSTEM_BINARIES=1 /home/ncca/vcpkg/vcpkg install gtest glm \
gl3w glfw3 rapidjson rapidxml fmt freetype openimageio

RUN git clone --depth 1 https://github.com:/NCCA/NGL ~/NGLBuild && \
cd ~/NGLBuild/ && \
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -G Ninja -B build -S . &&\
cd build && cmake --build .
RUN cd ~/NGLBuild/build && ./NGLTests -g
# set default command
ENTRYPOINT ["/bin/bash"]
11 changes: 11 additions & 0 deletions Dockerfiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dockerfiles

This folder contains the Dockerfiles for different operating sytems to allow quick tests for new os versions etc. Each docker file is in it's own named folder

## Fedora

This builds a fedora:latest image installs all the pre-requiste libs and clones NGL

```
docker build -t ngl-fedora .
```
36 changes: 36 additions & 0 deletions Dockerfiles/Rocky/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#set the base image
FROM rockylinux
# install tools
RUN dnf -y groupinstall "Development Tools" && \
dnf -y --enablerepo=crb install g++ wget vim ninja-build cmake \
mesa-libGL-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel openssl-devel



WORKDIR /home/ncca
ENV HOME /home/ncca
ENV PATH=$PATH:/usr/local/bin
# the cmake version in the repo is too old for vcpkg!
# RUN wget https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2.tar.gz && \
# tar -zxvf cmake-3.23.2.tar.gz && \
# cd cmake-3.23.2 && \
# ./bootstrap && \
# make && make install

# download and install vcpkg


RUN git clone https://github.com/Microsoft/vcpkg.git ~/vcpkg && \
cd ~/vcpkg && \
./bootstrap-vcpkg.sh

RUN VCPKG_FORCE_SYSTEM_BINARIES=1 /home/ncca/vcpkg/vcpkg install gtest glm \
gl3w glfw3 rapidjson rapidxml fmt freetype openimageio

RUN git clone --depth 1 https://github.com:/NCCA/NGL ~/NGLBuild && \
cd ~/NGLBuild/ && \
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -G Ninja -B build -S . &&\
cd build && cmake --build .
RUN cd ~/NGLBuild/build && ./NGLTests -g
# set default command
ENTRYPOINT ["/bin/bash"]

0 comments on commit 8a104f3

Please sign in to comment.