Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package installation fails when volume mounted #22

Open
suud opened this issue Sep 26, 2023 · 1 comment
Open

Package installation fails when volume mounted #22

suud opened this issue Sep 26, 2023 · 1 comment

Comments

@suud
Copy link

suud commented Sep 26, 2023

Executing the following commands from the README.md results in a series of errors:

mkdir -p dependencies
docker run --rm -v "$PWD"/dependencies:/lambda/opt lambci/yumda:2 yum install -y git GraphicsMagick jp2a

Errors:

Installing : libjpeg-turbo-1.2.90-6.lambda2.0.3.x86_64                   1/44Error unpacking rpm package libjpeg-turbo-1.2.90-6.lambda2.0.3.x86_64

error: unpacking of archive failed on file /opt/lib/libjpeg.so.62.1.0;6512c11f: cpio: open
  Installing : fipscheck-1.4.1-6.lambda2.0.2.x86_64                        2/44Error unpacking rpm package fipscheck-1.4.1-6.lambda2.0.2.x86_64

error: libjpeg-turbo-1.2.90-6.lambda2.0.3.x86_64: install failed
error: unpacking of archive failed on file /opt/bin/fipscheck;6512c11f: cpio: open
[...]

These commands did work for me a couple of weeks ago.

When removing the volume mount, installation does not fail:

docker run --rm lambci/yumda:2 yum install -y git GraphicsMagick jp2a
@suud
Copy link
Author

suud commented Sep 26, 2023

Using this script as workaround for now:

#!/bin/bash

# Run the Docker container and install packages
CONTAINER_ID=$(docker run -d lambci/yumda:2 yum install -y git GraphicsMagick jp2a)

# Wait for installation to complete
docker wait $CONTAINER_ID

# Copy files from /lambda/opt to host
docker cp $CONTAINER_ID:/lambda/opt/. "$PWD"/dependencies/

# Remove the container
docker rm $CONTAINER_ID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant