Compare commits
No commits in common. "a449fc6afd19be612795267cba2753109afd8d5f" and "770a36cef60904355eaa7a658adc065bd33dc86c" have entirely different histories.
a449fc6afd
...
770a36cef6
|
@ -1,6 +1,7 @@
|
|||
ARG REGISTRY=local
|
||||
from ${REGISTRY}/binutils as binutils
|
||||
from ${REGISTRY}/m4 as m4
|
||||
from ${REGISTRY}/lex as lex
|
||||
from ${REGISTRY}/gcc as gcc
|
||||
from ${REGISTRY}/musl as musl
|
||||
from ${REGISTRY}/make as make
|
||||
|
@ -12,10 +13,10 @@ from ${REGISTRY}/bison as bison
|
|||
from ${REGISTRY}/busybox as busybox
|
||||
|
||||
FROM busybox as base
|
||||
ENV VERSION=2.6.4
|
||||
ENV SRC_SITE=https://github.com/westes/flex/releases/download/v${VERSION}/flex-${VERSION}.tar.gz
|
||||
ENV SRC_HASH=e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995
|
||||
ENV SRC_FILE=flex-${VERSION}.tar.gz
|
||||
ENV SRC_VERSION=2.5.11
|
||||
ENV SRC_SITE=http://download.nust.na/pub2/openpkg1/sources/DST/flex/flex-2.5.11.tar.gz
|
||||
ENV SRC_HASH=bc79b890f35ca38d66ff89a6e3758226131e51ccbd10ef78d5ff150b7bd73689
|
||||
ENV SRC_FILE=flex-${SRC_VERSION}.tar.gz
|
||||
|
||||
FROM base as fetch
|
||||
RUN set -eux; \
|
||||
|
@ -35,7 +36,6 @@ COPY --from=automake . /
|
|||
COPY --from=bison . /
|
||||
COPY --from=gettext . /
|
||||
COPY --from=musl . /
|
||||
|
||||
RUN set -eux; \
|
||||
./autogen.sh; \
|
||||
./configure \
|
||||
|
@ -44,8 +44,10 @@ RUN set -eux; \
|
|||
--prefix=/usr \
|
||||
--bindir=/bin \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info; \
|
||||
make LDFLAGS=-static
|
||||
--infodir=/usr/share/info \
|
||||
--disable-shared \
|
||||
--disable-static; \
|
||||
make
|
||||
|
||||
FROM build as install
|
||||
USER 0:0
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
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}/busybox:latest as busybox
|
||||
|
||||
FROM busybox as base
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
ENV SRC_VERSION 070527
|
||||
ENV SRC_FILE heirloom-devtools-${SRC_VERSION}.tar.bz2
|
||||
ENV SRC_SITE=http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/${SRC_VERSION}/${SRC_FILE}
|
||||
ENV SRC_HASH=9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba
|
||||
|
||||
FROM base as fetch
|
||||
RUN wget ${SRC_SITE}
|
||||
RUN echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xjf ${SRC_FILE}
|
||||
WORKDIR heirloom-devtools-${SRC_VERSION}
|
||||
RUN set -eux; \
|
||||
make yacc/Makefile lex/Makefile; \
|
||||
make -C yacc LDFLAGS=-static; \
|
||||
make -C lex LDFLAGS=-static
|
||||
|
||||
FROM build as install
|
||||
USER 0:0
|
||||
RUN set -eux; \
|
||||
mkdir -p /rootfs/usr/bin; \
|
||||
install lex/lex /rootfs/usr/bin
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
||||
ENTRYPOINT ["/usr/bin/lex"]
|
||||
CMD ["-V"]
|
|
@ -39,13 +39,14 @@ define build
|
|||
--platform $(PLATFORM) \
|
||||
--progress=plain \
|
||||
$(if $(filter latest,$(VERSION)),,--build-arg VERSION=$(VERSION)) \
|
||||
--output type=oci,force-compression=true,name=$(NAME),annotation.org.opencontainers.image.revision=$(REVISION),annotation.org.opencontainers.image.version=$(VERSION),dest=$(basename $@).tar \
|
||||
--output type=oci,force-compression=true,name=$(NAME),annotation.org.opencontainers.image.revision=$(REVISION),annotation.org.opencontainers.image.version=$(VERSION),dest=- \
|
||||
--target $(TARGET) \
|
||||
$(EXTRA_ARGS) \
|
||||
$(NOCACHE_FLAG) \
|
||||
src/$(CATEGORY)/$(NAME) \
|
||||
&& gzip < $(basename $@).tar > $@ \
|
||||
&& rm $(basename $@).tar \
|
||||
> $(basename $@).tar.tmp \
|
||||
&& gzip < $(basename $@).tar.tmp > $@ \
|
||||
&& rm $(basename $@).tar.tmp \
|
||||
&& gunzip -c $@ | docker load; \
|
||||
)
|
||||
$(eval TIMESTAMP := $(shell TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ"))
|
||||
|
|
Reference in New Issue