crossplane / crossplane/function-runtime-oci
Cannot execute OCI images that contain /bin/busybox binary
- Lenguaje dominante
- Go
- Estrellas
- 6
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
# 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"]
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduce el fallo con el Dockerfile proporcionado y el comando xfn run, y luego sigue la cadena de errores reportada de run.Command.Run() y spark.Command.Run(). Investiga la extracción de capas OCI alrededor del enlace simbólico /bin/busybox existente; se considera terminado cuando la imagen de función se ejecuta correctamente sin el error de que el archivo ya existe.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, go
- Área
- infrastructure
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100