File: Dockerfile

package info (click to toggle)
golang-github-containerd-accelerated-container-image 1.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,500 kB
  • sloc: sh: 351; python: 59; makefile: 30
file content (37 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

ARG GO_VERSION=latest
ARG GOLANG_IMAGE=golang:${GO_VERSION}
FROM ${GOLANG_IMAGE} AS golang

FROM ubuntu:22.04 AS builder

WORKDIR /go/src/github.com
ARG TARGETARCH

ENV GOTOOLCHAIN=local
COPY --link --from=golang /usr/local/go/ /usr/local/go/

RUN apt update && apt install -y \
    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 \
    sudo pkg-config autoconf automake \
    g++ cmake make wget git curl \
    && apt clean

COPY ./overlaybd ./overlaybd
COPY ./accelerated-container-image ./accelerated-container-image

RUN export PATH=$PATH:/usr/local/go/bin && \
    cd overlaybd && rm -rf build && mkdir build && cd build && cmake ../ && make -j && make install && cd ../.. && \
    cd accelerated-container-image && make -j && make install

FROM ubuntu:22.04

COPY --from=builder /opt/overlaybd /opt/overlaybd
COPY --from=builder /etc/overlaybd /etc/overlaybd
COPY --from=builder /etc/overlaybd-snapshotter /etc/overlaybd-snapshotter

RUN apt update && apt install -y \
    libcurl4-openssl-dev libaio-dev \
    && apt clean

ENTRYPOINT ["/opt/overlaybd/snapshotter/convertor"]