You are not logged in.

#1 2018-08-07 15:29:49

sdfgeoff
Member
Registered: 2018-08-07
Posts: 1

Arch from docker: install package from AUR?

I'm attempting to get a docker container set up for use as a Continuous Integration platform using arch as the OS.
So, as per the wiki instructions  (https://wiki.archlinux.org/index.php/Docker#Arch_Linux ) I clone the archlinux docker image, modify the package list. All is good, life is sweet. Until I discover I need mingw-w64 to build a linux binary. Mingw-w64 exists inside the AUR, so it should be easy enough, right?


But:
- Cloning the pkgbuild and running makepkg isn't possible because you are root and makepkg doesn't allow itself to be run as root
- Creating a user inside the container and running makepkg as the user also doesn't work because you have to enter the root password for the container - Ideally the "building" of this container to be able to be done non-interactively (and there is no root password for the container anyway).

How can I install a package from the aur inside a docker container image.
In essence this is: "how can I dodge makepkg's inability to run as root without requiring human interaction". Makepkg is, of course, designed to not be run as root and to require human interaction.

One solution is available here: https://github.com/greyltc/docker-archl … add-aur.sh where the root sets up a user with passwordless sudo access to run makepkg. Is there a better solution?

Last edited by sdfgeoff (2018-08-07 15:30:21)

Offline

#2 2018-08-07 15:47:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Arch from docker: install package from AUR?

How can I install a package from the aur inside a docker container image.

Can you use pacman to install packages to a docker image ?

If not, building the mingw-w64 packages the normal way and adding them to the docker image seems the best solution.

Last edited by Lone_Wolf (2018-08-07 15:49:03)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2018-08-07 15:55:39

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Arch from docker: install package from AUR?

sdfgeoff wrote:

One solution is available here: https://github.com/greyltc/docker-archl … add-aur.sh where the root sets up a user with passwordless sudo access to run makepkg. Is there a better solution?

This seems like a perfectly reasonable solution, why is this not good enough?

Note also, that that is precisely what our own official devtools does to build repository packages in clean chroot containers.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB