Debian Codegraph @

Dockerfile

raw
1 # Copyright The containerd Authors.
2
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6
7 # http://www.apache.org/licenses/LICENSE-2.0
8
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 ARG CONTAINERD_VERSION=1.6.17
16 ARG RUNC_VERSION=1.1.5
17 ARG NERDCTL_VERSION=1.3.0
18
19 FROM golang:1.20.12-bookworm AS golang-base
20
21 FROM golang-base AS containerd-snapshotter-base
22 ARG CONTAINERD_VERSION
23 ARG RUNC_VERSION
24 ARG NERDCTL_VERSION
25 ARG TARGETARCH
26 COPY . $GOPATH/src/github.com/awslabs/soci-snapshotter
27 ENV GOPROXY direct
28 RUN apt-get update -y && apt-get install -y libbtrfs-dev libseccomp-dev libz-dev gcc fuse pigz
29 RUN cp $GOPATH/src/github.com/awslabs/soci-snapshotter/out/soci /usr/local/bin/ && \
30 cp $GOPATH/src/github.com/awslabs/soci-snapshotter/out/soci-snapshotter-grpc /usr/local/bin/ && \
31 mkdir /etc/soci-snapshotter-grpc && \
32 mkdir /etc/containerd/ && \
33 cp $GOPATH/src/github.com/awslabs/soci-snapshotter/integration/config/etc/soci-snapshotter-grpc/config.toml /etc/soci-snapshotter-grpc/ && \
34 cp $GOPATH/src/github.com/awslabs/soci-snapshotter/integration/config/etc/containerd/config.toml /etc/containerd/
35 RUN curl -sSL --output /tmp/containerd.tgz https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-${TARGETARCH:-amd64}.tar.gz && \
36 tar zxvf /tmp/containerd.tgz -C /usr/local/ && \
37 rm -f /tmp/containerd.tgz
38 RUN curl -sSL --output /tmp/runc https://github.com/opencontainers/runc/releases/download/v${RUNC_VERSION}/runc.${TARGETARCH:-amd64} && \
39 cp /tmp/runc /usr/local/bin/ && \
40 chmod +x /usr/local/bin/runc && \
41 rm -f /tmp/runc
42 RUN curl -sSL --output /tmp/nerdctl.tgz https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-${TARGETARCH:-amd64}.tar.gz && \
43 tar zxvf /tmp/nerdctl.tgz -C /usr/local/bin/ && \
44 rm -f /tmp/nerdctl.tgz
45
46 FROM registry:2 AS registry2