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

     1  # Copyright (c) 2016, Maciej Sieczka. All rights reserved
     2  #
     3  # Minimal installation process is defined in mods/linux_build_arch.smod. A
     4  # couple extra actions are called from here using RunCmd and InstallPkgs
     5  # Singularity bootstrap keywords. Adjust them as needed.
     6  # https://wiki.archlinux.org/index.php/Installation_Guide may come in handy.
     7  
     8  DistType "arch"
     9  
    10  # "Setup" keyword doesn't do anything anymore, at least as of Singularity
    11  # 2.1.2. Undocumented "PreSetup" replaced it and is called at each
    12  # `singularity bootstrap' run.
    13  # Setup
    14  
    15  Bootstrap
    16  
    17  # Set time zone. Use whatever you prefer instead of UTC.
    18  RunCmd ln -s /usr/share/zoneinfo/UTC /etc/localtime
    19  
    20  # WARNING: Make sure you prefix the STDOUT redirection target (ie. that guy
    21  # after `>' or `>>`) with $SINGULARITY_BUILD_ROOT in RunCmd calls, as below.
    22  # Otherwise such command will write to host's filesystem, at least as of
    23  # Singularity 2.1.2! This is a known issue, going to be fixed. See
    24  # https://github.com/gmkurtzer/singularity/issues/200.
    25  
    26  # Set locale. Use whatever you prefer instead of en_US.
    27  RunCmd echo 'en_US.UTF-8 UTF-8' > "$SINGULARITY_BUILD_ROOT"/etc/locale.gen
    28  # Add more locales as needed, eg:
    29  # RunCmd echo 'pl_PL.UTF-8 UTF-8' >> "$SINGULARITY_BUILD_ROOT"/etc/locale.gen
    30  RunCmd locale-gen
    31  RunCmd echo 'LANG=en_US.UTF-8' > "$SINGULARITY_BUILD_ROOT"/etc/locale.conf
    32  # Mind that Singularity's shell will use host's locale no matter what anyway,
    33  # as of version 2.1.2. This may change in a future release.
    34  
    35  # Set the package mirror server(s). This is only for the output image's
    36  # mirrorlist. `pacstrap' can only use your hosts's package mirrors.
    37  RunCmd echo 'Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch' > "$SINGULARITY_BUILD_ROOT"/etc/pacman.d/mirrorlist
    38  # Add any number of fail-over servers, eg:
    39  RunCmd echo 'Server = https://archlinux.honkgong.info/$repo/os/$arch' >> "$SINGULARITY_BUILD_ROOT"/etc/pacman.d/mirrorlist
    40  
    41  # I need VIM and Bash completion. Specify your extra packages as needed.
    42  InstallPkgs vim bash-completion
    43  
    44  # Remove the packages downloaded to image's Pacman cache dir during
    45  # InstallPkgs. BTW, `pacstrap', used in Bootstrap step, uses host's package
    46  # cache rather than the image's.
    47  RunCmd paccache -r -k0
    48  
    49  Cleanup