mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-15 19:51:15 +00:00
Previously the "tini" contained the entire build. Using the multi-stage build creates a new "tini" base image, which only contains the "/bin/tini". This image can be used as the base image for packages requiring "tini". Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
14 lines
494 B
Docker
14 lines
494 B
Docker
FROM linuxkit/c-compile:f52f485825c890d581e82a62af6906c1d33d8e5d@sha256:473fd283a090d3546e93915adacf00c69a23ff615c95c968c4a40e8723985853 AS tini-build
|
|
COPY . /
|
|
ENV TINI_VERSION=0.13.0
|
|
ADD https://github.com/krallin/tini/archive/v${TINI_VERSION}.tar.gz tini-${TINI_VERSION}.tar.gz
|
|
|
|
RUN zcat tini-${TINI_VERSION}.tar.gz | tar xvf -
|
|
RUN cd tini-${TINI_VERSION} && cmake . && make && cp -a tini-static /bin/tini
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
CMD []
|
|
WORKDIR /
|
|
COPY --from=tini-build bin/tini bin/tini
|