You are not logged in.

#1 2022-10-24 11:54:40

gwpl
Member
From: Warsaw, Poland
Registered: 2010-07-10
Posts: 26

AUR Helper for Docker (rua?)

Hello!

I would love to have easy way to make docker images with fresh Archlinux and installing from AUR using some AUR Helper (to fetch and compile all dependencies without user interaction).

Does anyone has best template/solution/example for this?

I tried to use `rua` ( https://aur.archlinux.org/packages/rua ) AUR Helper , but has problems running inside docker ( https://github.com/vn971/rua/issues/8#i … 1277359483 ),

example docker file:

FROM archlinux:latest
RUN pacman -Syyu --noconfirm && \
pacman -S --noconfirm    git base-devel  vim base-devel bubblewrap-suid xz shellcheck rustup 
#       &&  \  #because we setup default rust toolchain on packager user
#rustup default stable && rustup install stable && rustc -V

#RUN set -x ; mkdir /home/nobody && chown -v nobody:nobody /home/nobody && cd /home/nobody/ && sudo -u nobody git clone https://aur.archlinux.org/pacaur.git && cd pacaur/ && sudo -u nobody makepkg -si


# # set up the packager user
RUN useradd --create-home packager --uid 1111 -U
# COPY bashrc.sh /home/packager/.bashrc
# COPY packager-actions /etc/sudoers.d/
# 
# RUN pacman -S --noconfirm meson gtest gmock expac jq
# #RUN pacman -S --noconfirm

# this is attempt to make it work in docker:
# (but maybe not needed if dependencies installed like README.md advices: --needed git base-devel bubblewrap-suid xz shellcheck cargo)
RUN chmod u+s /usr/bin/bwrap # https://github.com/containers/bubblewrap/issues/324#issuecomment-517378834
# but turned out to issue about running rua in docker: https://github.com/vn971/rua/issues/8

RUN pacman -S --noconfirm --needed --asdeps git base-devel bubblewrap-suid libseccomp xz shellcheck cargo # from https://github.com/vn971/rua#install-dependencies

USER packager
WORKDIR /home/packager/


RUN rustup default stable
RUN cargo install rua
RUN /home/packager/.cargo/bin/rua install logseq-desktop

Last edited by gwpl (2022-10-24 11:56:02)

Offline

#2 2022-10-24 12:38:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,515
Website

Re: AUR Helper for Docker (rua?)

If you are putting this in a docker file anyways, why would you install an AUR "helper" (which itself needs to be installed from the AUR).  Just use `got clone ...` and makepkg.

Last edited by Trilby (2022-10-24 12:39:08)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-10-27 13:12:41

gwpl
Member
From: Warsaw, Poland
Registered: 2010-07-10
Posts: 26

Re: AUR Helper for Docker (rua?)

Maybe there is something that I do not understand about makepkg or AUR Helpers , but I thought they help also in fetching and compiling all required depenencies (that maybe other AUR packages) .

Would I achieve the same with just one makepkg? To get smooth install of AUR package with all required (AUR and non AUR) dependencies?

Offline

#4 2022-10-27 14:06:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,515
Website

Re: AUR Helper for Docker (rua?)

Makepkg has a flag for installing any dependencies from the repos, but not from the AUR.  But if you are scripting this anyways, you know ahead of time which packages are needed, right?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-10-28 00:09:48

lfitzgerald
Member
Registered: 2021-07-16
Posts: 110

Re: AUR Helper for Docker (rua?)

Aren't there other AUR helpers that don't use bubblewrap? Can you use them instead?

Offline

Board footer

Powered by FluxBB