Skip to content

Commit

Permalink
Merge pull request #298 from Wheat2018/main
Browse files Browse the repository at this point in the history
Add Dockerfile for overlaybd convertor
  • Loading branch information
BigVan authored Aug 15, 2024
2 parents e4e6077 + 48947b3 commit 44b254d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:22.04 AS builder

WORKDIR /go/src/github.com
ARG TARGETARCH

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 \
&& wget https://go.dev/dl/go1.22.5.linux-${TARGETARCH}.tar.gz \
&& tar -C /usr/local -xzf go1.22.5.linux-${TARGETARCH}.tar.gz \
&& rm go1.22.5.linux-${TARGETARCH}.tar.gz

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"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ Accelerated Container Image is a __non-core__ sub-project of containerd.

It is an overlaybd-based remote image format which enables the original OCI image to be a remote one without conversion. It is similar to [SOCI](https://github.com/awslabs/soci-snapshotter), but provides block device interface, which has advantages than FUSE-based formats in performance and stability.

## Docker Image

The `Dockerfile` is supplied to build the image of the overlaybd convertor. You can build the docker image by yourself as follows:

```
docker build -f Dockerfile -t overlaybd-convertor .
```

Then run the overlaybd convertor image (see [QUICKSTART](docs/QUICKSTART.md) for more details):

```
docker run overlaybd-convertor -r registry.hub.docker.com/library/redis -i 6.2.1 -o 6.2.1_obd_new
```

## Getting Started

* [QUICKSTART](docs/QUICKSTART.md) helps quickly run an overlaybd image including basic usage.
Expand Down

0 comments on commit 44b254d

Please sign in to comment.