github.com/apptainer/singularity@v3.1.1+incompatible/examples/arch/Singularity (about)

     1  # Copyright (c) 2015-2016, Maciej Sieczka, Gregory M. Kurtzer. All rights
     2  # reserved.
     3  #
     4  # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved.
     5  # Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
     6  #
     7  # Copyright (c) 2015-2017, Gregory M. Kurtzer. All rights reserved.
     8  #
     9  # Minimal installation process is defined in
    10  # libexec/bootstrap/modules-v2/dist-arch.sh. A couple extra actions are called
    11  # from here in `%post' section. Adjust them as needed.
    12  # https://wiki.archlinux.org/index.php/Installation_Guide may come in handy.
    13  
    14  Bootstrap: arch
    15  
    16  %runscript
    17      echo "This is what happens when you run the container..."
    18  
    19  %post
    20      echo "Hello from inside the container"
    21  
    22      # Set time zone. Use whatever you prefer instead of UTC.
    23      ln -s /usr/share/zoneinfo/UTC /etc/localtime
    24  
    25      # Set locale. Use whatever you prefer instead of en_US.
    26      echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
    27      # Add more locales as needed, eg:
    28      # echo 'pl_PL.UTF-8 UTF-8' >> /etc/locale.gen
    29      locale-gen
    30      echo 'LANG=en_US.UTF-8' > /etc/locale.conf
    31      # Mind that Singularity's shell will use host's locale no matter what
    32      # anyway, as of version 2.1.2. This may change in a future release.
    33  
    34      # Set the package mirror server(s). This is only for the output image's
    35      # mirrorlist. `pacstrap' can only use your hosts's package mirrors.
    36      echo 'Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
    37      # Add any number of fail-over servers, eg:
    38      echo 'Server = https://archlinux.honkgong.info/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
    39  
    40      # I need VIM and Bash completion. Specify your extra packages as needed.
    41      pacman -Sy --noconfirm vim bash-completion
    42  
    43      # Remove the packages downloaded to image's Pacman cache dir.
    44      pacman -Sy --noconfirm pacman-contrib
    45      paccache -r -k0