Need help with alpine-chroot-install?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

168 Stars 45 Forks MIT License 117 Commits 8 Opened issues


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

Services available


Need anything else?

Contributors list

= Install Alpine Linux in chroot :script-name: alpine-chroot-install :script-sha1: 7c7e3fa378e69aecc7f5f01bbc759e5f0a9d9b74 :gh-name: alpinelinux/{script-name} :version: 0.13.1

ifdef::env-github[] image:{gh-name}/workflows/CI/badge.svg["Build Status", link="{gh-name}/actions"] endif::env-github[]


script simplifies installation of[Alpine Linux] for testing purposes on any x8664 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.[GitHub Actions] or[Travis CI]) 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.

== 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
on Debian/Ubuntu), try an older Alpine Linux branch (option
, e.g.
-b v3.11

== Usage

Read documentation in link:{script-name}[{script-name}]. See link:.github/workflows/ci.yml[] for GitHub Actions example.

You can copy link:{script-name}[{script-name}] into your repository or download it on demand, e.g.:

[source, sh, subs="verbatim, attributes"] wget{gh-name}/v{version}/{script-name} \ && echo '{script-sha1} {script-name}' | sha1sum -c \ || exit 1

== License

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.