https://github.com/sighery/arch-builder-docker
Docker image of Arch Linux with a builder user to run makepkg with
https://github.com/sighery/arch-builder-docker
arch-linux docker-image makepkg
Last synced: 2 months ago
JSON representation
Docker image of Arch Linux with a builder user to run makepkg with
- Host: GitHub
- URL: https://github.com/sighery/arch-builder-docker
- Owner: Sighery
- License: mit
- Created: 2019-12-30T01:32:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-09T08:01:12.000Z (almost 6 years ago)
- Last Synced: 2025-08-22T18:01:02.627Z (10 months ago)
- Topics: arch-linux, docker-image, makepkg
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/sighery/archbuilder
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Sighery/arch-builder-docker/actions)
[](https://hub.docker.com/r/sighery/archbuilder)
# 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
```bash
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:
```bash
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:
```bash
sudo pacman -U outputs/package-name-1.0.0-1-any.pkg.tar.xz
```