Coder Social home page Coder Social logo

sighery / arch-builder-docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 21 KB

Docker image of Arch Linux with a builder user to run makepkg with

Home Page: https://hub.docker.com/r/sighery/archbuilder

License: MIT License

Dockerfile 100.00%
arch-linux docker-image makepkg

arch-builder-docker's Introduction

Actions Main Build Docker

Builder image based in Arch Linux

This is a Docker image, based, and pretty close to the Docker Arch Linux latest image.

Only changes are running pacman -Sy to update the repositories, and installing base-devel and sudo.

base-devel is needed for compilation and building packages. It provides things such as needed binaries for makepkg. sudo is needed because makepkg refuses to run for the root user. This can be solved by patching the corresponding code in /usr/bin/makepkg, but that would require constant upkeep by my part.

Instead, this image creates a new user called builder and adds it to sudoers. Then, it creates the paths /builds/ and /builds/output and adds rights to it for the builder user.

It also configures makepkg so that all built packages will be sent to /builds/output/. This is useful to automatically get all the built packages back.

It does not contain yay or any other AUR helper.


Building this image

git clone https://github.com/Sighery/arch-builder-docker.git
cd arch-builder-docker
sudo docker build -t sighery/archbuilder:latest .
sudo docker run -it sighery/archbuilder:latest

Usage example

For the sake of keeping it brief (and because you can check the wonderful Arch Linux wiki on how to make PKGBUILD files). This is an example package: https://gist.github.com/Sighery/636a4cb05a59e12727ab08785a1d35dd

You'd use it by running (either with sudo if you run docker with sudo, or without) the following command:

sudo bash builder.sh

More info on what that script does here: https://stackoverflow.com/a/51186557

Basically it will build the image, create it, and then copy the output files from it back into your host ./outputs/.

Then you can install, or release your built packages. For installing:

sudo pacman -U outputs/package-name-1.0.0-1-any.pkg.tar.xz

arch-builder-docker's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar sighery avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.