This repository has been archived on 2024-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
stagex/libxml2/Dockerfile

56 lines
1.6 KiB
Docker
Raw Normal View History

2023-12-10 18:05:50 +00:00
ARG REGISTRY=local
FROM ${REGISTRY}/gcc:latest as gcc
FROM ${REGISTRY}/binutils:latest as binutils
FROM ${REGISTRY}/musl:latest as musl
FROM ${REGISTRY}/make:latest as make
FROM ${REGISTRY}/autoconf:latest as autoconf
FROM ${REGISTRY}/automake:latest as automake
FROM ${REGISTRY}/libtool:latest as libtool
FROM ${REGISTRY}/pkgconf:latest as pkgconf
FROM ${REGISTRY}/python:latest as python
FROM ${REGISTRY}/m4:latest as m4
2023-12-16 23:50:40 +00:00
FROM ${REGISTRY}/busybox:latest as busybox
2023-12-05 04:34:07 +00:00
2023-12-16 23:50:40 +00:00
FROM busybox as base
2023-12-05 04:34:07 +00:00
ENV SRC_SITE=https://gitlab.gnome.org/GNOME/libxml2/-/archive
ENV SRC_VERSION=2.12.1
ENV SRC_HASH=1090e62c5a1900429f63e4681263b96e7829876ccbc66cf2d9266cd589f67286
COPY --from=gcc . /
COPY --from=binutils . /
COPY --from=make . /
COPY --from=musl . /
COPY --from=python . /
COPY --from=autoconf . /
COPY --from=automake . /
COPY --from=pkgconf . /
COPY --from=libtool . /
COPY --from=m4 . /
2023-12-16 23:50:40 +00:00
FROM base as fetch
RUN wget ${SRC_SITE}/v${SRC_VERSION}/libxml2-v${SRC_VERSION}.tar.gz
RUN echo "${SRC_HASH} libxml2-v${SRC_VERSION}.tar.gz" | sha256sum -c
FROM fetch as build
RUN tar -xf libxml2-v${SRC_VERSION}.tar.gz
WORKDIR libxml2-v${SRC_VERSION}
2023-12-05 04:34:07 +00:00
RUN set -eux; \
sh autogen.sh; \
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--target=x86_64-unknown-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info; \
2023-12-16 23:50:40 +00:00
make
FROM build as install
USER 0:0
RUN set -eux; \
make DESTDIR=/rootfs install; \
find /rootfs -exec touch -hcd "@0" "{}" +
2023-12-05 04:34:07 +00:00
2023-12-12 17:45:39 +00:00
FROM scratch as package
2023-12-16 23:50:40 +00:00
COPY --from=install /rootfs /