Skip to content

Commit

Permalink
Adding some simple Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldruce committed Jun 15, 2024
1 parent dd67eac commit 6c6ba26
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/
cmake-build/
lib/
venv/
/Dockerfile/
/Makefile/
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM RFL/docker/cmake AS builder

RUN apt-get install -y \
libarmadillo-dev \
libgsl-dev \
git \
doxygen \
graphviz \
libhdf5-serial-dev

COPY ./ /RFL/

WORKDIR /RFL

RUN cmake -B ./build . \
&& cmake --build ./build --target all -j 4

RUN ( cd build && ctest -j 2 )\
&& cmake --install ./build

FROM RFL/docker/cmake

COPY --from=builder /RFL/lib/new_RFL/include /usr/include/RFL/
COPY --from=builder /RFL/lib/new_RFL/bin/ /usr/lib/RFL

COPY --from=builder /RFL/lib/RFL/include /usr/include/old_RFL/
COPY --from=builder /RFL/lib/RFL/bin/ /usr/lib/old_RFL
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TIMESTAMP=$(shell date +%Y%m%d)

docker-build:
docker build . -t RFL/rfl:${TIMESTAMP}
docker tag RFL/rfl:${TIMESTAMP} RFL/rfl:latest
3 changes: 3 additions & 0 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ubuntu:24.04

RUN apt-get update && apt-get upgrade -y
6 changes: 6 additions & 0 deletions docker/base/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

TIMESTAMP=$(shell date +%Y%m%d)

build:
docker build . -t RFL/docker/base:${TIMESTAMP}
docker tag RFL/docker/base:${TIMESTAMP} RFL/docker/base:latest
9 changes: 9 additions & 0 deletions docker/cmake/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM RFL/docker/base

RUN apt-get install -y \
cmake \
clang \
make \
gcc \
g++ \
libc-dev
6 changes: 6 additions & 0 deletions docker/cmake/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TIMESTAMP=$(shell date +%Y%m%d)


build:
docker build . -t RFL/docker/cmake:${TIMESTAMP}
docker tag RFL/docker/cmake:${TIMESTAMP} RFL/docker/cmake:latest

0 comments on commit 6c6ba26

Please sign in to comment.