mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-06 14:34:15 +00:00
Note that this is not the latest (which was 95efd45db073 at time of writing) but the next commit 6428b4bad0c2 merges "Port ctr to use client package" breaks the use of `ctr run --runtime-config` (by removing that option). This contains https://github.com/containerd/containerd/pull/954 which was causing some services to fail to start. All previous uses of15541037b9are updated to5749f2e9e6. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
46 lines
1.3 KiB
Docker
46 lines
1.3 KiB
Docker
FROM linuxkit/containerd:5749f2e9e65395cc6635229e8da0e0d484320ddf AS mirror
|
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
|
RUN apk add --no-cache --initdb -p /out \
|
|
tini
|
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|
RUN mkdir -p /out/dev /out/proc /out/sys
|
|
|
|
FROM linuxkit/containerd:5749f2e9e65395cc6635229e8da0e0d484320ddf AS build
|
|
RUN apk add \
|
|
argp-standalone \
|
|
automake \
|
|
gcc \
|
|
linux-headers \
|
|
make \
|
|
musl-dev \
|
|
patch
|
|
|
|
COPY . /
|
|
|
|
ENV pkgname=rng-tools pkgver=5
|
|
|
|
ADD http://downloads.sourceforge.net/project/gkernel/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz $pkgname-$pkgver.tar.gz
|
|
RUN sha256sum -c sha256sums
|
|
RUN zcat $pkgname-$pkgver.tar.gz | tar xf -
|
|
|
|
RUN cd $pkgname-$pkgver && for p in ../*.patch; do cat $p | patch -p1; done
|
|
|
|
RUN cd $pkgname-$pkgver && \
|
|
export LIBS="-largp" && \
|
|
LDFLAGS=-static ./configure \
|
|
--prefix=/usr \
|
|
--libexecdir=/usr/lib/rng-tools \
|
|
--sysconfdir=/etc \
|
|
--disable-silent-rules && \
|
|
make && \
|
|
make DESTDIR=/ install && \
|
|
strip /usr/sbin/rngd
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
WORKDIR /
|
|
COPY --from=mirror /out/ /
|
|
COPY --from=build usr/sbin/rngd usr/sbin/rngd
|
|
CMD ["/sbin/tini", "/usr/sbin/rngd", "-f"]
|
|
LABEL org.mobyproject.config='{"capabilities": ["CAP_SYS_ADMIN"], "oomScoreAdj": -800, "readonly": true, "net": "new", "ipc": "new"}'
|