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/zlib/Dockerfile

29 lines
803 B
Docker

FROM imgrep/busybox:latest as busybox
FROM imgrep/gcc:latest as gcc
FROM imgrep/binutils:latest as binutils
FROM imgrep/musl:latest as musl
FROM imgrep/make:latest as make
FROM busybox as build
COPY --from=gcc . /
COPY --from=binutils . /
COPY --from=make . /
COPY --from=musl . /
ENV SRC_SITE=https://www.zlib.net/
ENV SRC_VERSION=1.3
ENV SRC_HASH=ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e
RUN wget ${SRC_SITE}/zlib-${SRC_VERSION}.tar.gz
RUN echo "${SRC_HASH} zlib-${SRC_VERSION}.tar.gz" | sha256sum -c
RUN tar -xf zlib-${SRC_VERSION}.tar.gz
WORKDIR zlib-${SRC_VERSION}
RUN set -eux; \
./configure \
--prefix=/usr \
--libdir=/lib \
--shared; \
make;
RUN make DESTDIR=/home/user/rootfs install
FROM scratch
COPY --from=build /home/user/rootfs /