Skip to content

Instantly share code, notes, and snippets.

@agowa
Created February 23, 2020 09:37
Show Gist options
  • Save agowa/4ac1e3e32d1ed1aa119dbe17179236d0 to your computer and use it in GitHub Desktop.
Save agowa/4ac1e3e32d1ed1aa119dbe17179236d0 to your computer and use it in GitHub Desktop.
FROM archlinux:latest AS common_builder
RUN pacman -Syu --needed --noconfirm --noprogressbar
RUN pacman -S --needed --noconfirm --noprogressbar base base-devel sudo git
RUN useradd -s /bin/bash foo && mkdir /home/foo && chown foo:foo /home/foo
WORKDIR /home/foo
FROM common_builder AS nvm_builder
USER foo
RUN git clone https://aur.archlinux.org/nvm.git
RUN cd nvm && PKGDEST=/tmp /usr/sbin/makepkg
FROM common_builder AS bitwarden_builder
RUN pacman -S --needed --noconfirm --noprogressbar nodejs npm
COPY --from=nvm_builder /tmp/nvm-0.35.2-1-any.pkg.tar.xz /tmp/nvm-any.pkg.tar.xz
RUN pacman -U --needed --noconfirm --noprogressbar /tmp/nvm-any.pkg.tar.xz
USER foo
RUN git clone https://aur.archlinux.org/bitwarden-cli.git
RUN cd bitwarden-cli && PKGDEST=/tmp /usr/sbin/makepkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment