Skip to content

Commit

Permalink
Adds Dockerfiles for Ubuntu and Fedora with Boost lib from the offici…
Browse files Browse the repository at this point in the history
…al repos of the distros.
  • Loading branch information
aliakatas committed Jan 5, 2025
1 parent 0522cf9 commit e666376
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dev_containers/Dockerfile.fedora.38-dnf-boost
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Recipe to build a Dev image for gcc and gfortran with Boost 1.87.0 (custom-built)
# Build with:
# docker build -t aristos86/dev-fedora38-dnf-boost:latest -f Dockerfile.fedora.38-dnf-boost .
# Run with:
# docker run -it --rm -v $(pwd):/app aristos86/dev-fedora38-dnf-boost /bin/bash

# Use a lightweight Fedora image as the base
FROM fedora:38

# Install runtime dependencies
RUN dnf update -y
RUN dnf install -y \
gcc-c++ \
gcc-gfortran \
cmake \
make \
git \
vim \
boost-devel \
&& dnf autoremove -y \
&& dnf clean all \
&& rm -rf /var/cache/dnf

# Add a non-root user for development
RUN useradd -ms /bin/bash devuser
USER devuser
WORKDIR /home/devuser
24 changes: 24 additions & 0 deletions dev_containers/Dockerfile.ubuntu.22.04-apt-boost
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Recipe to build a Dev image for gcc and gfortran and Boost from APT repos
# Build with:
# docker build -t aristos86/dev-ubuntu2204-apt-boost:latest -f Dockerfile.ubuntu.22.04-apt-boost .
# Run with:
# docker run -it --rm -v $(pwd):/app aristos86/dev-ubuntu2204-apt-boost /bin/bash

FROM ubuntu:22.04

# Install essential tools for building Boost
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
gfortran \
libboost-all-dev \
cmake \
git \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Add a non-root user for development
RUN useradd -ms /bin/bash devuser
USER devuser
WORKDIR /home/devuser

0 comments on commit e666376

Please sign in to comment.