mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-05 08:44:24 +00:00
pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
FROM linuxkit/alpine:e2391e0b164c57db9f6c4ae110ee84f766edc430 AS build
|
||||
FROM linuxkit/alpine:0c069d0fd7defddb6e03925fcd4915407db0c9e1 AS build
|
||||
RUN apk add --no-cache --initdb alpine-baselayout make gcc musl-dev git linux-headers
|
||||
|
||||
ADD usermode-helper.c ./
|
||||
RUN LDFLAGS=-static CFLAGS=-Werror make usermode-helper
|
||||
|
||||
RUN apk add --no-cache go musl-dev
|
||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||
ENV GOPATH=/go PATH=$PATH:/go/bin GO111MODULE=off
|
||||
# Hack to work around an issue with go on arm64 requiring gcc
|
||||
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
|
||||
|
||||
@@ -18,7 +18,7 @@ RUN mkdir /tmp/bin && cd /tmp/bin/ && cp /go/bin/rc.init . && ln -s rc.init rc.s
|
||||
RUN cd /go/src/cmd/service && ./skanky-vendor.sh $GOPATH/src/github.com/containerd/containerd
|
||||
RUN go-compile.sh /go/src/cmd/service
|
||||
|
||||
FROM linuxkit/alpine:e2391e0b164c57db9f6c4ae110ee84f766edc430 AS mirror
|
||||
FROM linuxkit/alpine:0c069d0fd7defddb6e03925fcd4915407db0c9e1 AS mirror
|
||||
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||
RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/opencontainers/runc/libcontainer/system"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -49,7 +49,7 @@ func runcInit(rootPath, serviceType string) int {
|
||||
}
|
||||
|
||||
// need to set ourselves as a child subreaper or we cannot wait for runc as reparents to init
|
||||
if err := system.SetSubreaper(1); err != nil {
|
||||
if err := setSubreaper(1); err != nil {
|
||||
log.Fatalf("Cannot set as subreaper: %v", err)
|
||||
}
|
||||
|
||||
@@ -164,3 +164,9 @@ func runcInit(rootPath, serviceType string) int {
|
||||
|
||||
return status
|
||||
}
|
||||
|
||||
// setSubreaper copied directly from https://github.com/opencontainers/runc/blob/b23315bdd99c388f5d0dd3616188729c5a97484a/libcontainer/system/linux.go#L88
|
||||
// to avoid version and vendor conflict issues
|
||||
func setSubreaper(i int) error {
|
||||
return unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user