-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Fedora 41 and archived Fedora 39
- Loading branch information
Showing
10 changed files
with
195 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# | ||
# Dockerfile: http://github.com/cpp-projects-showcase/docker-images/tree/main/fedora41 | ||
# Usual Docker tag: infrahelpers/cpppython:fedora41 | ||
# Docker Hub/Cloud page: https://cloud.docker.com/u/infrahelpers/repository/docker/infrahelpers/cpppython | ||
# | ||
FROM fedora:41 | ||
|
||
LABEL authors="Christophe Gattardi <[email protected]>" | ||
LABEL version="0.1" | ||
|
||
# Docker build time environment variables | ||
ENV container="docker" | ||
ENV HOME="/home/build" | ||
|
||
# Update of Fedora and configure the locale | ||
RUN dnf -y upgrade && \ | ||
dnf -y install glibc-locale-source glibc-langpack-en && \ | ||
dnf -y clean all && \ | ||
localedef -f UTF-8 -i en_US en_US.UTF-8 | ||
|
||
# | ||
ENV LANGUAGE="en_US:en" | ||
ENV LANG="en_US.UTF-8" | ||
ENV LC_ALL="$LANG" | ||
|
||
# Environment for the `root` user | ||
ADD resources/bashrc /root/.bashrc | ||
|
||
# Basic, C++ and Python packages | ||
RUN dnf -y upgrade && \ | ||
dnf -y install less htop net-tools bind-utils which sudo man vim \ | ||
git-all wget curl file bash-completion keyutils \ | ||
zlib-devel bzip2-devel gzip tar patch rpmconf yum-utils \ | ||
langtable gcc gcc-c++ cmake cmake3 m4 cppunit-devel \ | ||
zeromq-devel czmq-devel cppzmq-devel openblas-devel \ | ||
boost-devel xapian-core-devel openssl-devel libffi-devel \ | ||
mpich-devel openmpi-devel \ | ||
readline-devel sqlite-devel mysql-devel \ | ||
soci-mysql-devel soci-sqlite3-devel | ||
RUN dnf -y install libicu-devel protobuf-devel protobuf-compiler \ | ||
python3-mod_wsgi \ | ||
python3 python3-devel \ | ||
python3.8 python3.9 \ | ||
python3.10 python3.10-devel python3.12 python3.12-devel \ | ||
geos-devel \ | ||
graphviz ghostscript doxygen \ | ||
R-devel \ | ||
rubygem-rake \ | ||
jq | ||
RUN dnf -y install "tex(latex)" texlive-epstopdf-bin | ||
RUN dnf -y clean all | ||
|
||
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq) | ||
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) && \ | ||
architecture=$(uname -m|sed 's/x86_/amd/') && \ | ||
echo "YQ_VER=${YQ_VER} - architecture=${architecture}" && \ | ||
curl -Ls \ | ||
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_${architecture} -o /usr/local/bin/yq && \ | ||
chmod +x /usr/local/bin/yq | ||
|
||
# Create the `build` user (for the development activities) | ||
RUN adduser build | ||
RUN echo "build ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/build && \ | ||
chmod 0440 /etc/sudoers.d/build | ||
|
||
# Configure SSH | ||
RUN mkdir -p $HOME/.ssh && chmod 700 $HOME/.ssh | ||
|
||
# Set up the packaging environment for the `build` user | ||
ADD resources/bashrc $HOME/.bashrc | ||
ADD resources/gitconfig $HOME/.gitconfig | ||
ADD resources/vimrc $HOME/.vimrc | ||
RUN chmod 640 $HOME/.bashrc $HOME/.gitconfig $HOME/.vimrc | ||
RUN chown -R build.build $HOME | ||
|
||
# Switch to the `build` user | ||
WORKDIR $HOME | ||
USER build | ||
|
||
# Git prompt | ||
RUN git clone https://github.com/magicmonty/bash-git-prompt.git $HOME/.bash-git-prompt --depth=1 | ||
|
||
# Python, Pyenv and pipenv (https://www.python.org/downloads/) | ||
RUN git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv | ||
|
||
# Hack to git update $HOME/.pyenv | ||
WORKDIR $HOME/.pyenv | ||
RUN git pull | ||
WORKDIR $HOME | ||
|
||
ENV PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH" | ||
# Python 3.13.1 | ||
RUN pyenv install 3.13.1 && \ | ||
pyenv global 3.13.1 && \ | ||
pip install -U pip | ||
RUN pyenv global system || echo "No default system version of Python. Sticking to 3.13.1" | ||
|
||
# Entry point | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Locale | ||
export LANG="en_US.UTF-8" | ||
export LC_ALL="en_US.UTF-8" | ||
|
||
# History | ||
export HISTTIMEFORMAT="%d/%m/%y %T " | ||
|
||
# Prompt | ||
source /usr/share/git-core/contrib/completion/git-prompt.sh | ||
export GIT_PS1_SHOWDIRTYSTATE=true | ||
export GIT_PS1_SHOWUNTRACKEDFILES=true | ||
export PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' | ||
|
||
## Python pyenv | ||
export PYENV_ROOT="${HOME}/.pyenv" | ||
export PATH="${PYENV_ROOT}/bin:${PATH}" | ||
|
||
if command -v pyenv 1>/dev/null 2>&1; then | ||
eval "$(pyenv init -)" | ||
fi | ||
|
||
# Source global definitions | ||
if [ -f /etc/bashrc ]; then | ||
. /etc/bashrc | ||
fi | ||
|
||
# Aliases | ||
alias rm='rm -i' | ||
alias cp='cp -i' | ||
alias mv='mv -i' | ||
alias dir='ls -laFh --color' | ||
alias grep='grep --color' | ||
|
||
# OpenTREP | ||
alias cdtrep='cd ~/dev/opentrep' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[alias] | ||
st = status | ||
cl = clone | ||
co = checkout | ||
ci = commit | ||
br = branch | ||
fe = fetch | ||
pl = pull | ||
ps = push | ||
|
||
[push] | ||
default = tracking | ||
|
||
[pull] | ||
rebase = false | ||
|
||
[color] | ||
ui = auto | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
" General | ||
syntax on | ||
set number | ||
set ruler | ||
set visualbell | ||
set encoding=utf-8 | ||
set ignorecase | ||
set showmatch | ||
"set background=dark | ||
|
||
" Plugin management | ||
"set nocompatible " be iMproved, required | ||
"filetype off " required | ||
|
||
" Tell vim to remember certain things when we exit | ||
" '10 : marks will be remembered for up to 10 previously edited files | ||
" "100 : will save up to 100 lines for each register | ||
" :20 : up to 20 lines of command-line history will be remembered | ||
" % : saves and restores the buffer list | ||
" n... : where to save the viminfo files | ||
set viminfo='10,\"100,:20,%,n~/.viminfo | ||
|
||
function! ResCur() | ||
if line("'\"") <= line("$") | ||
normal! g`" | ||
return 1 | ||
endif | ||
endfunction | ||
|
||
augroup resCur | ||
autocmd! | ||
autocmd BufWinEnter * call ResCur() | ||
augroup END | ||
|
||
|