Skip to content

A suite of docker images to build and test biber under Alpine Linux

Notifications You must be signed in to change notification settings

krumeich/biber-alpine

Repository files navigation

Building biber under Alpine Linux

The TeX Live distribution does not provide biber for MUSL based Linux distros such as Alpine.

Building

This project provides the means to build and test biber under Alpine Linux from the source. Run

docker build -t krumeich/biber-alpine .

to build the image. This takes some time, as all the perl dependencies are downloaded and installed. Then run

docker run -v $PWD:/opt krumeich/biber-alpine

to build the biber binary. Mounting the $PWD as /opt makes the directory visible in which the build process installs the packed binary.

Testing

To test the build the binary should be run in an environment that does not contain the build infrastructure, such as Perl and all the required libraries. This project also provides a test environment. Run

docker build -f Dockerfile.test --tag krumeich/biber-test .

to build the image for the test environment. Then run

docker run --rm -v $PWD:/usr/local/bin krumeich/biber-test

to run simple tests to validate the build. Again, the current directory is mounted into the container to access the binary which as been produced in the previous steps.

Notes

  • Passing -e branch=<branchname> causes the branch <branchname> to be built. If the parameter is omitted, branch will default to dev:

    docker run -v $PWD:/usr/local/bin -e branch=krumeich/musl krumeich/biber-alpine
  • Passing -e repo=<reponame> causes the repository <reponame> to be built. If the parameter is omitted, repo will default to plk/biber:

    docker run -v $PWD:/usr/local/bin -e repo=krumeich/biber krumeich/biber-alpine

Of course you can combine both variants to build an arbitrary branch from an arbitrary biber fork.

Building and Testing with make

  • Alternatively, if you have make installed, use make image to create the image, then use make biber to build biber. To pass a particular branch name, set the environment variables BRANCH and/or REPO on the same command line:

    BRANCH=krumeich/musl REPO=krumeich/biber make biber
  • Consequently, run make test to build the test environment and run the validation.

  • If you are completely lazy, then just run make all to build all images, the biber binary and run the test in one go.

About

A suite of docker images to build and test biber under Alpine Linux

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published