Debian Codegraph @

Dockerfile

raw
1
2 ARG GO_VERSION=latest
3 ARG GOLANG_IMAGE=golang:${GO_VERSION}
4 FROM ${GOLANG_IMAGE} AS golang
5
6 FROM ubuntu:22.04 AS builder
7
8 WORKDIR /go/src/github.com
9 ARG TARGETARCH
10
11 ENV GOTOOLCHAIN=local
12 COPY --link --from=golang /usr/local/go/ /usr/local/go/
13
14 RUN apt update && apt install -y \
15 libcurl4-openssl-dev libssl-dev libaio-dev libnl-3-dev libnl-genl-3-dev libgflags-dev libzstd-dev libext2fs-dev libgtest-dev libtool zlib1g-dev e2fsprogs \
16 sudo pkg-config autoconf automake \
17 g++ cmake make wget git curl \
18 && apt clean
19
20 COPY ./overlaybd ./overlaybd
21 COPY ./accelerated-container-image ./accelerated-container-image
22
23 RUN export PATH=$PATH:/usr/local/go/bin && \
24 cd overlaybd && rm -rf build && mkdir build && cd build && cmake ../ && make -j && make install && cd ../.. && \
25 cd accelerated-container-image && make -j && make install
26
27 FROM ubuntu:22.04
28
29 COPY --from=builder /opt/overlaybd /opt/overlaybd
30 COPY --from=builder /etc/overlaybd /etc/overlaybd
31 COPY --from=builder /etc/overlaybd-snapshotter /etc/overlaybd-snapshotter
32
33 RUN apt update && apt install -y \
34 libcurl4-openssl-dev libaio-dev \
35 && apt clean
36
37 ENTRYPOINT ["/opt/overlaybd/snapshotter/convertor"]