File: Singularity.busybox

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 (21 lines) | stat: -rw-r--r-- 756 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
Bootstrap: scratch

%setup
    busybox_url='https://www.busybox.net/downloads/binaries/1.28.2-defconfig-multiarch/busybox-x86_64'

    # Create necessary config files.
    printf 'root:!:0:0:root:/root:/bin/sh\n' > "${SINGULARITY_ROOTFS}/etc/passwd"
    printf 'root:x:0:\n' > "${SINGULARITY_ROOTFS}/etc/group"

    chmod 0644 "${SINGULARITY_ROOTFS}/etc/passwd" "${SINGULARITY_ROOTFS}/etc/group"

    # Create bin directory.
    mkdir "${SINGULARITY_ROOTFS}/bin"
    chmod 0755 "${SINGULARITY_ROOTFS}/bin"

    # Download busybox binary.
    curl -o "${SINGULARITY_ROOTFS}/bin/busybox" "${busybox_url}"
    chmod 0755 "${SINGULARITY_ROOTFS}/bin/busybox"

    # Install busybox.
    "${SINGULARITY_ROOTFS}/bin/busybox" --install "${SINGULARITY_ROOTFS}/bin"