File: Singularity

package info (click to toggle)
singularity-container 4.1.5%2Bds4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,876 kB
  • sloc: asm: 14,840; sh: 3,190; ansic: 1,751; awk: 414; makefile: 413; python: 99
file content (45 lines) | stat: -rw-r--r-- 1,842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright (c) 2015-2016, Maciej Sieczka, Gregory M. Kurtzer. All rights
# reserved.
#
# Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved.
# Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
#
# Copyright (c) 2015-2017, Gregory M. Kurtzer. All rights reserved.
#
# Minimal installation process is defined in
# libexec/bootstrap/modules-v2/dist-arch.sh. A couple extra actions are called
# from here in `%post' section. Adjust them as needed.
# https://wiki.archlinux.org/index.php/Installation_Guide may come in handy.

Bootstrap: arch

%runscript
    echo "This is what happens when you run the container..."

%post
    echo "Hello from inside the container"

    # Set time zone. Use whatever you prefer instead of UTC.
    ln -s /usr/share/zoneinfo/UTC /etc/localtime

    # Set locale. Use whatever you prefer instead of en_US.
    echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
    # Add more locales as needed, eg:
    # echo 'pl_PL.UTF-8 UTF-8' >> /etc/locale.gen
    locale-gen
    echo 'LANG=en_US.UTF-8' > /etc/locale.conf
    # Mind that Singularity's shell will use host's locale no matter what
    # anyway, as of version 2.1.2. This may change in a future release.

    # Set the package mirror server(s). This is only for the output image's
    # mirrorlist. `pacstrap' can only use your hosts's package mirrors.
    echo 'Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
    # Add any number of fail-over servers, eg:
    echo 'Server = https://archlinux.honkgong.info/$repo/os/$arch' >> /etc/pacman.d/mirrorlist

    # I need VIM and Bash completion. Specify your extra packages as needed.
    pacman -Sy --noconfirm vim bash-completion

    # Remove the packages downloaded to image's Pacman cache dir.
    pacman -Sy --noconfirm pacman-contrib
    paccache -r -k0