Comments (13)
Fixed in PR #286.
Thanks to the new version of udocker the alpine containers can be used in AWS Lambda.
from scar.
The root of the problem is two-fold:
- In the alpine:latest Docker image, the command-line utilities (say /bin/sh, /bin/ls are symlinks to /bin/busybox)
- When activating the F1 execution mode in uDocker this problem is exhibited.
Steps to reproduce this issue:
udocker create --name=test-alpine alpine:latest
udocker setup --execmode=F1 test-alpine
udocker run test-alpine /bin/ls
Error: command not found or has no execute bit set: ['/bin/ls']
Two options here:
- Raise an issue in uDocker to see if they can fix this in uDocker.
- Handle this in scarsupervisor.
Concerning (2), rewriting /bin/ls
to /bin/busybox ls
is not an option since the following error appears:
udocker run test-alpine /bin/busybox ls
Warning: running as uid 0 is not supported by this engine
Warning: non-existing user will be created##############################################################################
STARTING 819365c8-102d-34d1-9b7e-917afe328940
##############################################################################
executing: busybox
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __snprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __vfprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __chk_fail: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __memmove_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __strcpy_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __fprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __sprintf_chk: symbol not found
from scar.
For the sake of reference these are the udocker execution modes tested (W means successfully running the busybox command in a container out of the alpine:latest image executed in a local Linux box)
- P1: proot accelerated mode using seccomp --> W, but not a valid mode for AWS Lambda
- P2: proot accelerated mode disabled --> W, but not a valid mode for AWS Lambda
- F1: fakeroot starting executables via direct loader invocation --> Does not work
- F2: similar to F1 with protected environment and modified ld.so --> Does not work
- F3: fakeroot patching elf headers in libraries and executables --> Does not work
- F4: similar to F3 with support for newly created executables via
dynamic patching elf headers of libraries and executables --> Does not work - R1: runc rootless --> Does not work (not a valid mode for AWS Lambda)
from scar.
Filed an issue in uDocker: See: indigo-dc/udocker#76
from scar.
It looks like this may be an issue with Alpine only supporting Musl instead of GLIBC.
Tested the frolvlad/alpine-glibc but the very same error is obtained.
from scar.
For the sake of reference, tested another image with the same results:
udocker run mikesir87-aws-cli /usr/bin/python aws s3 ls
Warning: running as uid 0 is not supported by this engine
Warning: non-existing user will be created
##############################################################################
# #
# STARTING 8f630e53-1eb1-3f01-8207-b40cd2db1c1f #
# #
##############################################################################
executing: python2.7
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __snprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __vfprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __chk_fail: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __memmove_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __strcpy_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __fprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __sprintf_chk: symbol not found
from scar.
It seems that it a problem with the libfakechroot used. Using the alpine libfakechroot lib (linked to musl) it seems to work.
from scar.
@gmolto What if the alpine image I use already has glibc installed #28 (comment)
from scar.
@frezbo Hi. This was already tested unsuccessfully with the frolvlad/alpine-glibc image as you can see in the previous comments. No progress AFAIK in uDocker in this respect.
from scar.
Hi, seeking a little help here. Is your observation that solutions like alpine-pkg-glibc
won't fix this kind of issues?
Error relocating ...: __snprintf_chk: symbol not found
Related: gliderlabs/docker-alpine#149
from scar.
Looks like version 1.1.3 of udocker provides some experimental code for Alpine according to: indigo-dc/udocker#76
from scar.
How can I try scar with version 1.1.3? I tried to modify the Dockerfile (and monkey-patched some files in the repo), but I can't get past this error:
Unable to find "/scar/src/providers/aws/cloud/lambda/udocker/udocker-1.1.3.tar.gz" when adding binary and data files.
The command '/bin/sh -c pyinstaller --onefile --add-data="src/providers/aws/cloud/lambda/scarsupervisor.py:src/providers/aws/cloud/lambda" --add-data="src/providers/aws/cloud/lambda/clients/apigateway.py:src/providers/aws/cloud/lambda/clients" --add-data="src/providers/aws/cloud/lambda/clients/batch.py:src/providers/aws/cloud/lambda/clients" --add-data="src/providers/aws/cloud/lambda/clients/lambdafunction.py:src/providers/aws/cloud/lambda/clients" --add-data="src/providers/aws/cloud/lambda/clients/s3.py:src/providers/aws/cloud/lambda/clients" --add-data="src/providers/aws/cloud/lambda/clients/udocker.py:src/providers/aws/cloud/lambda/clients" --add-data="src/exceptions.py:src" --add-data="src/utils.py:src" --add-data="src/providers/aws/cloud/lambda/udocker/udocker-1.1.3.tar.gz:src/providers/aws/cloud/lambda/udocker" --add-binary="udockerb:src/providers/aws/cloud/lambda/udocker" --add-binary="/usr/bin/zip:src/bin" --hidden-import=urllib3 --hidden-import=configparser scar.py' returned a non-zero code: 1
from scar.
I created a branch called 'udocker-update' with the latest version of udocker.
This version solves the issue with alpine containers (at least the containers that I tested).
Please check the if branch works correctly with your containers.
from scar.
Related Issues (20)
- My docker image is 396MB which is <512MB still AWS cloud watch fails to execute saying No SPACE LEFT HOT 2
- Scar unable to execute AWS Lambda function using Uploaded Docker image to S3 HOT 2
- Bash script executed successfully but how do i post the results to cloudwatch HOT 5
- How can i schedule scar run -n <Function name> HOT 2
- How To Convert your "scar init -f scar.yaml" inside docker to an equivalent docker exec -it scar init -f scar.yaml file using docker-compose HOT 1
- Can I use this lambda for training? HOT 3
- Getting No logs/failures for private docker "scar init -n SREBlackBoxTester -i 8236.dkr.ecr.us-west-2.amazonaws.com/abc-gat:latest" HOT 6
- JSON object must be str, bytes or bytearray, not NoneType HOT 5
- Scar local, does not honour env variables HOT 3
- Is it possible to mount a container using tmpfs? HOT 1
- Running a script inside docker container HOT 1
- How do I send an input(for ex a json input) to my script that is running in the container in aws lambda? HOT 3
- Access EFS storage from within container HOT 10
- batch processing from public bucket / subscribing to SNS topic HOT 2
- Allow creating a function inside a VPC
- Integration with Serverless
- How could the darknet example be changed if the weights, cfg, and data files were in s3?
- S3 storage not working with user-defined scripts HOT 2
- Error checking supervisor version in run command in case if image runtime
- SCAR throwing “Must specify userName when calling with non-User credentials” error when using AWS temporary credentials.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scar.