Skip to content

Instantly share code, notes, and snippets.

@superherointj
Created December 22, 2019 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superherointj/fe031e0255d86fc40fc333a7e14de310 to your computer and use it in GitHub Desktop.
Save superherointj/fe031e0255d86fc40fc333a7e14de310 to your computer and use it in GitHub Desktop.
Tracking pony-stable issue - Upstream or Packaging?
FROM superherointj/archlinux-base as archlinux-pkgbuild-base
# ArchLinux PKGBUILD requires
RUN pacman -S --noconfirm fakeroot binutils
#Pick EITHER:
# (1) base-devel
# (2) fakeroot binutils
RUN mkdir /app
WORKDIR /app
# makepkg requires non-root user
RUN useradd notroot
RUN chown -R notroot /app
USER notroot
FROM archlinux-pkgbuild-base as pkgbuild-ponystable-srcpackage
RUN curl -o PKGBUILD https://git.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/pony-stable
# Pony-Stable requires gcc, make, pony --- BUT PKGBUILD only makerequires ponyc. ???
RUN pacman -S --noconfirm gcc make ponyc
RUN makepkg -s
# Testing built package
FROM superherointj/archlinux-base as pkgbuild-ponystable-testpackage
RUN mkdir /app
WORKDIR /app
# USER root
COPY --from=pkgbuild-ponystable-srcpackage /app/*.tar.xz /app
RUN pacman --noconfirm -U /app/*.tar.xz
RUN stable version
# It works just fine!
FROM superherointj/archlinux-base
RUN pacman --noconfirm -S pony-stable
RUN stable version
# Errors as:
# The command '/bin/sh -c stable version' returned a non-zero code: 132
# https://github.com/superherointj/dockerfile-archlinux-base/blob/master/Dockerfile
FROM archlinux
RUN pacman -Syu --noconfirm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment