prebuild / prebuildify-cross

Compile prebuilds in Docker.
17 stars 6 forks source link

Installing further development packages #10

Closed thegecko closed 2 years ago

thegecko commented 2 years ago

This is a great project.

I was wondering what the recommended approach would be for adding a common package to all of the images for a specific setup.

e.g. in my situation, I need prebuildify docker images which include libudev-dev.

I can see two approaches, both with drawbacks:

FROM gchr.io/prebuild/linux-armv6:1
USER 0
RUN apt-get -y update && apt-get -y install libudev-dev
USER node
thegecko commented 2 years ago

Solved using derived images which copy the lib files to the proper cross-compiled locations. e.g.:

FROM ghcr.io/prebuild/android-arm64:1
USER 0
COPY arm64/libudev.h ${QEMU_LD_PREFIX}/usr/include/
COPY arm64/libudev.so ${QEMU_LD_PREFIX}/usr/lib/
USER node