• Stars
    star
    285
  • Rank 144,434 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Install Alpine Linux in chroot with a breeze. Build ARM on Travis CI or any other x86_64 CI.

Install Alpine Linux in chroot

Build Status

This alpine-chroot-install script simplifies installation of Alpine Linux for testing purposes on any x86_64 Linux system using chroot(1). Optionally it also utilizes qemu-user and binfmt to emulate different architecture.

The main purpose of this script is to easily create Alpine environment on Ubuntu-based CI services (e.g. Travis CI and similar) and possibly emulate other architectures (e.g. ARM) on x86_64-only CI service.

Installation of Alpine Linux is a matter of a few seconds… 5 seconds to be more specific. It takes just ~5 seconds to prepare a chroot, install fresh Alpine including gcc build environment and execute first command! And it doesn’t use any prebuilt rootfs archive or image, and no Docker, of course. All you need to install Alpine Linux is just apk-tools — Alpine’s package manager — which is automatically downloaded by this script.

Note: If you use GitHub Actions, you’re better off using jirutka/setup-alpine instead of this script.

Requirements

  • Linux system with common userland (Busybox or GNU coreutils)

  • POSIX-sh compatible shell (e.g. Busybox ash, dash, Bash, ZSH)

  • qemu-user ≥ 2.6 and binfmt, or apt-get (needed only for emulation of different architecture)

Note that Alpine binaries needs up-to-date version of QEMU. If you encounter error qemu: Unsupported syscall, it means that your QEMU version is too old. If you can’t upgrade QEMU (package qemu-user-static on Debian/Ubuntu), try an older Alpine Linux branch (option -b, e.g. -b v3.11).

Usage

Read documentation in alpine-chroot-install. See .github/workflows/ci.yml for GitHub Actions example.

You can copy alpine-chroot-install into your repository or download it on demand, e.g.:

wget https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.14.0/alpine-chroot-install \
    && echo 'ccbf65f85cdc351851f8ad025bb3e65bae4d5b06  alpine-chroot-install' | sha1sum -c \
    || exit 1

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.

More Repositories

1

docker-alpine

Official Alpine Linux Docker image. Win at minimalism!
Lua
1,067
star
2

aports

[MIRROR] Alpine packages build scripts
Shell
634
star
3

alpine-make-vm-image

Make customized Alpine Linux disk image for virtual machines
Shell
293
star
4

alpine-make-rootfs

Make customized Alpine Linux rootfs (base image) for containers
Shell
178
star
5

apk-tools

[MIRROR] Alpine package manager
C
164
star
6

alpine-conf

[MIRROR] Alpine configuration management scripts
Shell
67
star
7

abuild

[MIRROR] Build script to build Alpine packages
Shell
59
star
8

mkinitfs

[MIRROR] Tool to create initramfs images
Shell
54
star
9

awall

[MIRROR] Alpine firewall configuration tool
Lua
46
star
10

alpine-secdb

[MIRROR] Alpine Linux security database
Lua
40
star
11

aports-turbo

[MIRROR] Alpine Linux package database
Lua
24
star
12

docker-abuild

WARNING This project has moved to Alpine Linux GitLab instance
Shell
19
star
13

linux-stable-grsec

grsecurity backports for linux-stable branches
C
17
star
14

alpine-iso

Alpine ISO image generation scripts (mirror)
Makefile
16
star
15

alpine-docker-gitlab

[MIRROR] Gitlab docker image based on Alpine Linux
Shell
14
star
16

turbo-paste

[MIRROR] Turbo paste
Lua
13
star
17

alpine-netboot

Alpine netboot (mirror)
CSS
9
star
18

ca-certificates

Mirror of git://git.alpinelinux.org/ca-certificates
Perl
9
star
19

alpine-wiki

Alpine Linux wiki
HTML
8
star
20

alpine-backup

Alpine Remote Backup (mirror)
Shell
6
star
21

alpine-baselayout

[MIRROR] Alpine boot scripts
Makefile
6
star
22

lua-aports

[MIRROR] Aports tools written in Lua
Lua
6
star
23

dmvpn-tools

[MIRROR] Userland tools to setup and manage DMVPN
Shell
4
star
24

alpine-mksite

[MIRROR] Website for alpinelinux.org
CSS
3
star
25

alpine-drone-ci

Build Alpine Linux packages with drone CI
Shell
2
star
26

alpine-mirror-status

[MIRROR] Scripts to generate Alpine mirror statistics
Lua
2
star
27

alpine_bootstrap

Alpine Linux bootstrap theme for drupal
CSS
1
star
28

build-server-status

[MIRROR] Web page for Alpine Linux build servers
Go
1
star