mirror of
				https://github.com/linuxkit/linuxkit.git
				synced 2025-10-31 00:45:22 +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>
		
			
				
	
	
		
			29 lines
		
	
	
		
			899 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			899 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 as alpine
 | |
| RUN \
 | |
|   apk add \
 | |
|   btrfs-progs-dev \
 | |
|   gcc \
 | |
|   git \
 | |
|   go \
 | |
|   libc-dev \
 | |
|   linux-headers \
 | |
|   make \
 | |
|   && true
 | |
| ENV GOPATH=/root/go
 | |
| ENV CONTAINERD_COMMIT=bdf9f5f7388e8203e63a74b89800f7f3dd4a7743
 | |
| RUN mkdir -p $GOPATH/src/github.com/containerd && \
 | |
|   cd $GOPATH/src/github.com/containerd && \
 | |
|   git clone https://github.com/containerd/containerd.git
 | |
| WORKDIR $GOPATH/src/github.com/containerd/containerd
 | |
| RUN git checkout $CONTAINERD_COMMIT
 | |
| RUN make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS="-extldflags \\\"-fno-PIC -static\\\""
 | |
| RUN cp bin/containerd bin/ctr bin/containerd-shim bin/dist /usr/bin/
 | |
| WORKDIR /
 | |
| COPY . .
 | |
| 
 | |
| FROM scratch
 | |
| ENTRYPOINT []
 | |
| WORKDIR /
 | |
| COPY --from=alpine /usr/bin/containerd /usr/bin/ctr /usr/bin/dist /usr/bin/containerd-shim /usr/bin/
 | |
| COPY --from=alpine /etc/containerd/config.toml /etc/containerd/
 |