hashicorp / hashicorp/packer-plugin-docker

Packer hangs on "Provisioning with shell script" when provisioning sysbox image

Open
#185 2 comments 0 reactions 0 assignees View on GitHub
bug stage/needs-verification
Dominant language
Go
Stars
40
Forks
29
PR merge metrics
No merged PRs in 30d

Description

#### Overview of the Issue

While using sysbox-runc with Packer to add an internal image to a container, the process hangs indefinitely. This issue occurs consistently during the image build process.

#### Reproduction Steps

1. Use the provided packer.pkr.hcl build file.
2. Run the run-build.sh script to initiate the build.
3. Observe the build process hanging during the image addition step.
4. Inspect build.log to find an error

> 2024/08/30 13:02:50 packer-provisioner-shell plugin: [INFO] 155 bytes written for 'uploadData'
> 2024/08/30 13:02:50 [INFO] 155 bytes written for 'uploadData'
> 2024/08/30 13:02:50 packer-plugin-docker_v1.0.10_x5.0_linux_amd64 plugin: 2024/08/30 13:02:50 Copying to /tmp/script_7262.sh on container 505d3288b02cc7c3fdb2f74ee76b6415d0534ee1ea37b5fecaba44c5e572ce6a.
> 2024/08/30 13:02:50 packer-plugin-docker_v1.0.10_x5.0_linux_amd64 plugin: 2024/08/30 13:02:50 Copied 155 bytes for /tmp/script_7262.sh
> 2024/08/30 13:02:50 packer-provisioner-shell plugin: Retryable error: Error uploading script: Failed to upload to '/tmp/script_7262.sh' in container: Error response from daemon: Could not find the file /tmp in container 505d3288b02cc7c3fdb2f74ee76b6415d0534ee1ea37b5fecaba44c5e572ce6a
> 2024/08/30 13:02:50 packer-provisioner-shell plugin: . exit status 1.
>

### Plugin and Packer version

Packer: 1.11.2
Packer Plugin Docker: 1.0.10
Sysbox: 0.6.4

### Simplified Packer Buildfile
[gist](https://gist.github.com/makp0/d22d767c5cbc8fe2218df7341dfeab40)

### Operating system and Environment details

Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
Arch: x86_64

[Repo with logs](https://github.com/user-attachments/files/16817532/Archive.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.