mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
Revert to non-development containerd and runc until nats port is sorted out
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
parent
19baaed651
commit
a29b6c1391
@ -7,6 +7,11 @@ RUN \
|
||||
adduser -D -H -s /sbin/nologin dockremap
|
||||
|
||||
COPY . .
|
||||
RUN cd /usr/bin && \
|
||||
ln -s docker-runc runc && \
|
||||
ln -s docker-containerd-shim containerd-shim && \
|
||||
ln -s docker-containerd-ctr containerd-ctr && \
|
||||
ln -s docker-containerd containerd
|
||||
|
||||
RUN \
|
||||
rc-update add sysctl boot && \
|
||||
|
@ -45,7 +45,7 @@ moby.img: Dockerfile etc usr init
|
||||
-C packages/9pmount-vsock sbin -C ../.. \
|
||||
-C packages/test etc -C ../.. \
|
||||
-C packages/iptables usr -C ../.. \
|
||||
-C packages/containerd etc usr -C ../.. \
|
||||
-C packages/containerd etc -C ../.. \
|
||||
-C packages/aws etc -C ../.. \
|
||||
-C packages/azure etc -C ../.. \
|
||||
-C packages/gcp etc -C ../.. \
|
||||
|
@ -1,4 +1,4 @@
|
||||
DEPS=proxy diagnostics transfused tap-vsockd docker nc-vsock vsudd 9pmount-vsock iptables containerd
|
||||
DEPS=proxy diagnostics transfused tap-vsockd docker nc-vsock vsudd 9pmount-vsock iptables
|
||||
.PHONY: clean $(DEPS)
|
||||
|
||||
default: $(DEPS)
|
||||
|
1
alpine/packages/containerd/.gitignore
vendored
1
alpine/packages/containerd/.gitignore
vendored
@ -1 +0,0 @@
|
||||
usr
|
@ -1,20 +0,0 @@
|
||||
CONTAINERD_IMAGE=mobylinux/containerd:cd9f1788bb2e8e7a342f32dd8ba70f450ff7ae2c@sha256:96a96f60751a1bb762e285f36e0cf9c5b4126933bb91475b7369efc990539165
|
||||
CONTAINERD_BINARIES=usr/bin/containerd usr/bin/containerd-shim usr/bin/ctr
|
||||
|
||||
RUNC_IMAGE=mobylinux/runc:1a72d872ae97b90ae52482e4cb33a2778e168358@sha256:2ea83d68baa57d547ec6d407d09cd495e4ef9cd6b0207ec3525fb2752b4a197e
|
||||
RUNC_BINARY=usr/bin/runc
|
||||
|
||||
default: $(RUNC_BINARY) $(CONTAINERD_BINARIES)
|
||||
|
||||
$(RUNC_BINARY):
|
||||
mkdir -p $(dir $@)
|
||||
docker run --rm --net=none $(RUNC_IMAGE) tar cf - $@ | tar xf -
|
||||
|
||||
$(CONTAINERD_BINARIES):
|
||||
mkdir -p $(dir $@)
|
||||
docker run --rm --net=none $(CONTAINERD_IMAGE) tar cf - $@ | tar xf -
|
||||
|
||||
clean:
|
||||
rm -rf usr
|
||||
|
||||
.DELETE_ON_ERROR:
|
@ -26,7 +26,7 @@ start()
|
||||
|
||||
for f in /containers/*
|
||||
do
|
||||
ctr run --bundle "$f" "$(basename $f)" 2>$LOG >$LOG &
|
||||
containerd-ctr containers start --no-pivot --attach "$(basename $f)" "$f" 2>$LOG >$LOG &
|
||||
printf " $(basename $f)"
|
||||
done
|
||||
|
||||
|
@ -40,7 +40,7 @@ DIAGNOSTICS=$(ps -eo args | grep '^/usr/bin/diagnostics-server')
|
||||
[ $? -eq 0 ] && ok "Diagnostics server running: $DIAGNOSTICS\n" || fail "No diagnostics server\n"
|
||||
CONTAINERD=$(ps -eo args | grep '^/usr/bin/containerd')
|
||||
[ $? -eq 0 ] && ok "System containerd server running: $CONTAINERD\n" || fail "No containerd server\n"
|
||||
CONTAINERPS=$(ctr list 2>&1)
|
||||
CONTAINERPS=$(containerd-ctr containers 2>&1)
|
||||
[ $? -eq 0 ] && ok "System containerd working\n" || fail "containerd failed: $CONTAINERPS\n"
|
||||
|
||||
exit $EXIT_STATUS
|
||||
|
@ -11,7 +11,7 @@ start()
|
||||
|
||||
ebegin "Running tests"
|
||||
|
||||
if ctr run --bundle /test test
|
||||
if containerd-ctr containers start --no-pivot --attach test /test
|
||||
then
|
||||
printf "Moby test suite PASSED\n"
|
||||
else
|
||||
|
@ -1,19 +0,0 @@
|
||||
FROM golang:1.7-alpine3.5
|
||||
RUN \
|
||||
apk update && apk upgrade -a && \
|
||||
apk add --no-cache \
|
||||
gcc \
|
||||
git \
|
||||
libc-dev \
|
||||
make \
|
||||
&& true
|
||||
ENV CONTAINERD_COMMIT=3b79682548339895fcf9976f60ddea8abc5fc97e
|
||||
RUN mkdir -p $GOPATH/src/github.com/docker && \
|
||||
cd $GOPATH/src/github.com/docker && \
|
||||
git clone https://github.com/docker/containerd.git
|
||||
WORKDIR $GOPATH/src/github.com/docker/containerd
|
||||
RUN git checkout $CONTAINERD_COMMIT
|
||||
RUN make binaries GO_GCFLAGS="-buildmode pie --ldflags '-extldflags \"-fno-PIC -static\"'"
|
||||
RUN cp bin/containerd bin/ctr bin/containerd-shim /usr/bin/
|
||||
WORKDIR /
|
||||
COPY . .
|
@ -1,29 +0,0 @@
|
||||
.PHONY: tag push
|
||||
|
||||
BASE=golang:1.7-alpine3.5
|
||||
IMAGE=containerd
|
||||
|
||||
default: push
|
||||
|
||||
hash: Dockerfile
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
docker run --rm $(IMAGE):build sh -c 'cat Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > $@
|
||||
|
||||
push: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
||||
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
tag: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
clean:
|
||||
rm -f hash
|
||||
|
||||
.DELETE_ON_ERROR:
|
@ -1,23 +0,0 @@
|
||||
FROM golang:1.7-alpine3.5
|
||||
RUN \
|
||||
apk update && apk upgrade -a && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
gcc \
|
||||
git \
|
||||
libc-dev \
|
||||
libseccomp-dev \
|
||||
linux-headers \
|
||||
make \
|
||||
&& true
|
||||
ENV RUNC_COMMIT=51371867a01c467f08af739783b8beafc154c4d7
|
||||
RUN mkdir -p $GOPATH/src/github.com/opencontainers && \
|
||||
cd $GOPATH/src/github.com/opencontainers && \
|
||||
git clone https://github.com/opencontainers/runc.git
|
||||
WORKDIR $GOPATH/src/github.com/opencontainers/runc
|
||||
RUN git checkout $RUNC_COMMIT
|
||||
# TODO static pie, currently no easy way to change build options
|
||||
RUN make static BUILDTAGS="seccomp"
|
||||
RUN cp runc /usr/bin/
|
||||
WORKDIR /
|
||||
COPY . .
|
@ -1,29 +0,0 @@
|
||||
.PHONY: tag push
|
||||
|
||||
BASE=golang:1.7-alpine3.5
|
||||
IMAGE=runc
|
||||
|
||||
default: push
|
||||
|
||||
hash: Dockerfile
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
docker run --rm $(IMAGE):build sh -c 'cat Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > $@
|
||||
|
||||
push: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
||||
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
tag: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
clean:
|
||||
rm -f hash
|
||||
|
||||
.DELETE_ON_ERROR:
|
@ -19,8 +19,8 @@ docker rm ${CONTAINER}
|
||||
|
||||
mkdir -p /var/log/nginx /var/cache/nginx
|
||||
|
||||
ctr run --bundle . ${NAME}
|
||||
ctr list
|
||||
containerd-ctr containers start ${NAME} .
|
||||
containerd-ctr containers
|
||||
```
|
||||
|
||||
For production, you will want to create the `config.json` offline and bundle it in with your
|
||||
|
Loading…
Reference in New Issue
Block a user