crossplane / crossplane/function-runtime-oci

Cannot execute OCI images that contain /bin/busybox binary

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
6
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

# Bug Report:

When trying to run a function using an OCI Image that contains /bin/busybox, it fails.

## Steps to reproduce:

1. Create a function image that contains `/bin/busybox`, e.g. by using `python:3.11-alpine` as a base image
2. Execute the function via xfn

```shell
cat functionio.yaml | docker run -v $(pwd)/auth.json:/root/.docker/config.json:ro -i --security-opt=seccomp=unconfined crossplane/xfn:v1.13.2 run -c /tmp registry.example/your/image:tag -
```

This will yield an error:

```
xfn: error: run.Command.Run(): cannot run function: exit status 1: xfn: error: spark.Command.Run(): cannot create OCI runtime bundle: cannot extract layer tarball: cannot handle tar header for "bin/tar": cannot extract tar header: cannot create symlink: symlink /bin/busybox /tmp/c/319e9a4a-f0a9-46e0-86a1-b887567124b8/rootfs/bin/busybox: file exists
```

## Expected

It executes the function

## Additional Infos

```Dockerfile
FROM python:3.11-alpine AS build
RUN python3 -m venv /venv && \
/venv/bin/pip install --upgrade pip setuptools wheel

FROM build AS build-venv
COPY requirements.txt /requirements.txt
RUN /venv/bin/pip install --disable-pip-version-check -r /requirements.txt

FROM python:3.11-alpine
COPY --from=build-venv /venv /venv
COPY . /app
WORKDIR /app
ENTRYPOINT ["/venv/bin/python3", "function.py"]
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Reproduce the failure with the provided Dockerfile and the xfn run command, then follow the reported run.Command.Run() and spark.Command.Run() error chain. Investigate OCI layer extraction around the existing /bin/busybox symlink; done means the function image executes successfully without the file-exists error.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, go
領域
infrastructure
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。