Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: wheat2018 <[email protected]>
  • Loading branch information
Wheat2018 committed Aug 15, 2024
1 parent e4e6077 commit 48947b3
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 48947b3

Please sign in to comment.