crossplane / crossplane/function-runtime-oci

Cannot execute OCI images that contain /bin/busybox binary

Ouverte
#6 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
6
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

# 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"]
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Reproduisez l’échec avec le Dockerfile fourni et la commande xfn run, puis suivez la chaîne d’erreurs signalée de run.Command.Run() et spark.Command.Run(). Étudiez l’extraction des couches OCI autour du lien symbolique /bin/busybox existant ; le travail est terminé lorsque l’image de fonction s’exécute correctement sans l’erreur indiquant que le fichier existe déjà.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, go
Domaine
infrastructure
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.