mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-17 21:59:10 +00:00
This is based on https://github.com/docker/swarmkit/pull/1965 which adds a direct containerd executor to swarmkit. It is very much a work in progress. With a suitable moby image (such as projects/swarmd/swarmd.yml) something like this should work: runc exec swarmd swarmctl service create --image docker.io/library/nginx:alpine --name nginx runc exec swarmd swarmctl service ls Signed-off-by: Ian Campbell <ian.campbell@docker.com>
37 lines
1.0 KiB
Docker
37 lines
1.0 KiB
Docker
FROM golang:1.7-alpine3.5
|
|
|
|
RUN \
|
|
apk update && apk upgrade && \
|
|
apk add --no-cache \
|
|
ca-certificates \
|
|
gcc \
|
|
git \
|
|
libc-dev \
|
|
make \
|
|
&& true
|
|
|
|
WORKDIR /
|
|
COPY Dockerfile.build Dockerfile.pkg Makefile /build/
|
|
|
|
# PR https://github.com/docker/swarmkit/pull/1965 from ijc25/containerd
|
|
ENV SWARMKIT_PR=1965
|
|
ENV SWARMKIT_COMMIT=82e9f43d84e9a0586903392cbe5bbac15fdbf552
|
|
|
|
RUN mkdir -p $GOPATH/src/github.com/docker && \
|
|
cd $GOPATH/src/github.com/docker && \
|
|
git clone https://github.com/docker/swarmkit.git
|
|
WORKDIR $GOPATH/src/github.com/docker/swarmkit
|
|
RUN [ -z "$SWARMKIT_PR" ] || git fetch origin pull/$SWARMKIT_PR/head
|
|
RUN git checkout $SWARMKIT_COMMIT
|
|
|
|
RUN make binaries GO_GCFLAGS="-buildmode pie --ldflags '-extldflags \"-fno-PIC -static\"'"
|
|
|
|
RUN mkdir -p /build/dist/usr/bin/ /build/dist/etc
|
|
RUN cp bin/swarmd bin/swarmctl /build/dist/usr/bin/
|
|
RUN strip /build/dist/usr/bin/swarmd /build/dist/usr/bin/swarmctl
|
|
|
|
RUN cp -r /etc/ssl /build/dist/etc/ssl
|
|
|
|
WORKDIR /build
|
|
CMD ["/bin/tar", "cf", "-", "-C", "dist", "."]
|