Skip to content

Commit a71acb9

Browse files
committed
Added Fedora 41 and archived Fedora 39
1 parent 2e206d8 commit a71acb9

File tree

10 files changed

+195
-4
lines changed

10 files changed

+195
-4
lines changed

.github/workflows/container-build-and-publish-fedora-based.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
# List of base OSes, based on RPM packages
5555
# For some reason, as of end 2024, the automatic build of Fedora
5656
# stalls. Locally, there is no issue
57-
os_img: [fedora39, fedora40]
57+
os_img: [fedora41, fedora40]
5858

5959
# https://github.com/cpp-projects-showcase/docker-images/settings/environments/4430897264/edit
6060
environment: docker-hub

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ The supported Linux distributions are
2020
[CentOS Stream 10 compose artifacts](https://composes.stream.centos.org/stream-10/development/latest-CentOS-Stream/compose/BaseOS/x86_64/iso/)),
2121
[CentOS 9 Stream](https://blog.centos.org/2021/12/introducing-centos-stream-9/),
2222
[CentOS 8 Stream](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2004),
23+
[Fedora 41](https://docs.fedoraproject.org/en-US/fedora/f41/release-notes/index.html),
2324
[Fedora 40](https://docs.fedoraproject.org/en-US/fedora/f40/release-notes/index.html),
24-
[Fedora 39](https://docs.fedoraproject.org/en-US/fedora/f39/release-notes/index.html),
2525
[Ubuntu 24.04 LTS (Noble Numbat)](https://releases.ubuntu.com/24.04/),
2626
[Ubuntu 22.04 LTS (Jammy Jellyfish)](https://releases.ubuntu.com/22.04/),
2727
[Ubuntu 20.04 LTS (Focal Fossa)](https://releases.ubuntu.com/20.04/),
@@ -54,7 +54,7 @@ available for every one to use.
5454
# Using the pre-built development images
5555
* Start the Docker container featuring the target Linux distribution
5656
(`<linux-distrib>` may be one of `rocky9`, `centos9`, `centos8`,
57-
`fedora40`, `fedora39`, `debian12`, `debian11`,
57+
`fedora41`, `fedora40`, `debian12`, `debian11`,
5858
`ubuntu2404`, `ubuntu2204`, or `ubuntu2004`):
5959
```bash
6060
$ docker pull infrahelpers/cpppython:<linux-distrib>
@@ -112,7 +112,7 @@ Resolving deltas: 100% (3665/3665), done.
112112
# Customize a Docker Image
113113
The images may be customized, and pushed to Docker Cloud;
114114
`<linux-distrib>` may be one of `rocky9`, `centos9`, `centos8`,
115-
`fedora40`, `fedora39`, `debian12`, `debian11`,
115+
`fedora41`, `fedora40`, `debian12`, `debian11`,
116116
`ubuntu2404`, `ubuntu2204`, or `ubuntu2004`:
117117
```bash
118118
$ mkdir -p ~/dev

os/fedora41/Dockerfile

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#
2+
# Dockerfile: http://github.com/cpp-projects-showcase/docker-images/tree/main/fedora41
3+
# Usual Docker tag: infrahelpers/cpppython:fedora41
4+
# Docker Hub/Cloud page: https://cloud.docker.com/u/infrahelpers/repository/docker/infrahelpers/cpppython
5+
#
6+
FROM fedora:41
7+
8+
LABEL authors="Christophe Gattardi <[email protected]>"
9+
LABEL version="0.1"
10+
11+
# Docker build time environment variables
12+
ENV container="docker"
13+
ENV HOME="/home/build"
14+
15+
# Update of Fedora and configure the locale
16+
RUN dnf -y upgrade && \
17+
dnf -y install glibc-locale-source glibc-langpack-en && \
18+
dnf -y clean all && \
19+
localedef -f UTF-8 -i en_US en_US.UTF-8
20+
21+
#
22+
ENV LANGUAGE="en_US:en"
23+
ENV LANG="en_US.UTF-8"
24+
ENV LC_ALL="$LANG"
25+
26+
# Environment for the `root` user
27+
ADD resources/bashrc /root/.bashrc
28+
29+
# Basic, C++ and Python packages
30+
RUN dnf -y upgrade && \
31+
dnf -y install less htop net-tools bind-utils which sudo man vim \
32+
git-all wget curl file bash-completion keyutils \
33+
zlib-devel bzip2-devel gzip tar patch rpmconf yum-utils \
34+
langtable gcc gcc-c++ cmake cmake3 m4 cppunit-devel \
35+
zeromq-devel czmq-devel cppzmq-devel openblas-devel \
36+
boost-devel xapian-core-devel openssl-devel libffi-devel \
37+
mpich-devel openmpi-devel \
38+
readline-devel sqlite-devel mysql-devel \
39+
soci-mysql-devel soci-sqlite3-devel
40+
RUN dnf -y install libicu-devel protobuf-devel protobuf-compiler \
41+
python3-mod_wsgi \
42+
python3 python3-devel \
43+
python3.8 python3.9 \
44+
python3.10 python3.10-devel python3.12 python3.12-devel \
45+
geos-devel \
46+
graphviz ghostscript doxygen \
47+
R-devel \
48+
rubygem-rake \
49+
jq
50+
RUN dnf -y install "tex(latex)" texlive-epstopdf-bin
51+
RUN dnf -y clean all
52+
53+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
54+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2,2 | cut -d'"' -f1,1) && \
55+
architecture=$(uname -m|sed 's/x86_/amd/') && \
56+
echo "YQ_VER=${YQ_VER} - architecture=${architecture}" && \
57+
curl -Ls \
58+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_${architecture} -o /usr/local/bin/yq && \
59+
chmod +x /usr/local/bin/yq
60+
61+
# Create the `build` user (for the development activities)
62+
RUN adduser build
63+
RUN echo "build ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/build && \
64+
chmod 0440 /etc/sudoers.d/build
65+
66+
# Configure SSH
67+
RUN mkdir -p $HOME/.ssh && chmod 700 $HOME/.ssh
68+
69+
# Set up the packaging environment for the `build` user
70+
ADD resources/bashrc $HOME/.bashrc
71+
ADD resources/gitconfig $HOME/.gitconfig
72+
ADD resources/vimrc $HOME/.vimrc
73+
RUN chmod 640 $HOME/.bashrc $HOME/.gitconfig $HOME/.vimrc
74+
RUN chown -R build.build $HOME
75+
76+
# Switch to the `build` user
77+
WORKDIR $HOME
78+
USER build
79+
80+
# Git prompt
81+
RUN git clone https://github.com/magicmonty/bash-git-prompt.git $HOME/.bash-git-prompt --depth=1
82+
83+
# Python, Pyenv and pipenv (https://www.python.org/downloads/)
84+
RUN git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
85+
86+
# Hack to git update $HOME/.pyenv
87+
WORKDIR $HOME/.pyenv
88+
RUN git pull
89+
WORKDIR $HOME
90+
91+
ENV PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
92+
# Python 3.13.1
93+
RUN pyenv install 3.13.1 && \
94+
pyenv global 3.13.1 && \
95+
pip install -U pip
96+
RUN pyenv global system || echo "No default system version of Python. Sticking to 3.13.1"
97+
98+
# Entry point
99+
CMD ["/bin/bash"]

os/fedora41/resources/bashrc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Locale
3+
export LANG="en_US.UTF-8"
4+
export LC_ALL="en_US.UTF-8"
5+
6+
# History
7+
export HISTTIMEFORMAT="%d/%m/%y %T "
8+
9+
# Prompt
10+
source /usr/share/git-core/contrib/completion/git-prompt.sh
11+
export GIT_PS1_SHOWDIRTYSTATE=true
12+
export GIT_PS1_SHOWUNTRACKEDFILES=true
13+
export PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
14+
15+
## Python pyenv
16+
export PYENV_ROOT="${HOME}/.pyenv"
17+
export PATH="${PYENV_ROOT}/bin:${PATH}"
18+
19+
if command -v pyenv 1>/dev/null 2>&1; then
20+
eval "$(pyenv init -)"
21+
fi
22+
23+
# Source global definitions
24+
if [ -f /etc/bashrc ]; then
25+
. /etc/bashrc
26+
fi
27+
28+
# Aliases
29+
alias rm='rm -i'
30+
alias cp='cp -i'
31+
alias mv='mv -i'
32+
alias dir='ls -laFh --color'
33+
alias grep='grep --color'
34+
35+
# OpenTREP
36+
alias cdtrep='cd ~/dev/opentrep'
37+
38+

os/fedora41/resources/gitconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[alias]
2+
st = status
3+
cl = clone
4+
co = checkout
5+
ci = commit
6+
br = branch
7+
fe = fetch
8+
pl = pull
9+
ps = push
10+
11+
[push]
12+
default = tracking
13+
14+
[pull]
15+
rebase = false
16+
17+
[color]
18+
ui = auto
19+

os/fedora41/resources/vimrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
" General
2+
syntax on
3+
set number
4+
set ruler
5+
set visualbell
6+
set encoding=utf-8
7+
set ignorecase
8+
set showmatch
9+
"set background=dark
10+
11+
" Plugin management
12+
"set nocompatible " be iMproved, required
13+
"filetype off " required
14+
15+
" Tell vim to remember certain things when we exit
16+
" '10 : marks will be remembered for up to 10 previously edited files
17+
" "100 : will save up to 100 lines for each register
18+
" :20 : up to 20 lines of command-line history will be remembered
19+
" % : saves and restores the buffer list
20+
" n... : where to save the viminfo files
21+
set viminfo='10,\"100,:20,%,n~/.viminfo
22+
23+
function! ResCur()
24+
if line("'\"") <= line("$")
25+
normal! g`"
26+
return 1
27+
endif
28+
endfunction
29+
30+
augroup resCur
31+
autocmd!
32+
autocmd BufWinEnter * call ResCur()
33+
augroup END
34+
35+

0 commit comments

Comments
 (0)