Closed gmolto closed 7 years ago
Done in pull request #52. An event.json file is created in a location based on the request_id:
The request_id does not seem to be available as an environment variable in the container (say REQUEST_ID). This is necessary for scripts in the containers to know the location of the event file.
The current environment variables are:
FAKECHROOT=true
container_uuid=c264515d-e6ba-3b4e-aaf6-20e2d535ad03
FAKECHROOT_DIR_MAP=/tmp/udocker-150-92ebcd53-b0a5-3a65-8ecd-5338fbdeb2fe-passwd!/etc/passwd:/tmp/udocker-150-39f325ac-1c34-3868-888e-e5d580cc2276-group!/etc/group
USER=sbx_user1099
LD_LIBRARY_PATH=/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//usr/lib:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//lib:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//usr/lib64:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//lib64:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//usr/lib/x86_64-linux-gnu:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//lib/x86_64-linux-gnu:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT/lib/x86_64-linux-gnu:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT/usr/lib/x86_64-linux-gnu:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT/usr/lib/x86_64-linux-gnu/gconv:/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT/usr/lib/x86_64-linux-gnu/coreutils:.
SHLVL=0
container_ruser=sbx_user1099
HOME=/
PS1=c264515d[\\W]$
FAKECHROOT_VERSION=2.18.1
container_root=/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT
container_execmode=F1
container_names=lambda_cont
LOGNAME=sbx_user1099
_=/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//lib64/ld-linux-x86-64.so.2
FAKECHROOT_BASE=/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT
USERNAME=sbx_user1099
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
FAKECHROOT_AF_UNIX_PATH=/tmp
LD_PRELOAD=/tmp/home/.udocker/lib/libfakechroot-x86_64.so
FAKECHROOT_EXCLUDE_PATH=/tmp:/dev:/proc
PWD=/
FAKECHROOT_ELFLOADER=/tmp/home/.udocker/containers/c264515d-e6ba-3b4e-aaf6-20e2d535ad03/ROOT//lib64/ld-linux-x86-64.so.2
Done in PR #79 If you do a printenv yo can see:
... PS1=69ec2f6b[\W]$ container_uuid=69ec2f6b-5be4-3497-a78b-6adc824bf5d2 HOME=/ REQUEST_ID=a031e3dd-4aa6-11e7-afb4-e3c4cd0c509e SHLVL=0 FAKECHROOT_AF_UNIX_PATH=/tmp LOGNAME=sbx_user1132 ...
The Lambda function receives an Event and Context object. At least the Event should be passed down to the running container to allow the following scenario:
Ideas for implementation. The SCAR supervisor Lambda function ...