Comments (3)
Hey @git-noise thanks for raising the issue. After some digging, it seems the limitation is that, in the docker-in-docker scenario, the path (/tmp/tmpqn5dh6cm
in your example) mounted to /var/task
is relative to the host but not to the container. /tmp/tmpqn5dh6cm
does not exist in the host but only in the container. That's why /var/task
is empty. (reference: https://forums.docker.com/t/mounting-a-volume-not-working-with-running-docker-in-docker/25775/3)
SAM CLI does not support "Docker-in-Docker" right now. I'll mark this issue as a feature request for support for "Docker-in-Docker" and bring that up to the team.
from aws-sam-cli.
Hello, thanks a lot for looking into it @hawflau.
Based on your insight, I was able to confirm that it is indeed an issue relating to volume mounting.
A quick test check that consists in mounting the full /tmp in the docker container, ensures that the temporary directory - here /tmp/tmpqn5dh6cm
- is available within both the host and the container, and then /var/task
properly populated.
Maybe an "easy" fix would be to adjust the function that creates these temporary directory, to take an optional base directory parameter? It would then allow for these temporary directory to be still created on the host, but in a specific directory that could be mounted on the sam-cli container?
Thanks for your help,
from aws-sam-cli.
@hawflau did this break recently? There are lots of posts and references for how to do docker-in-docker, including issues in this repo discussing how to get it working. I'm very surprised to see that it is not supported.
FWIW, I have the same exact issue (empty /var/task
)
from aws-sam-cli.
Related Issues (20)
- Bug: sam local start-api - ReadTimeout HOT 3
- Bug: "Timed out while attempting to establish a connection to the container" error after fresh install of Docker and AWS SAM HOT 7
- Bug: sam build - JSONDecodeError HOT 3
- Bug: No new Lambda Versions are deployed with Lambda configurations changes HOT 2
- Bug: Change Parameter's Default value doesn't reflect HOT 6
- Bug: AWS ADOT LAMBDA layer stuck when using local invoke HOT 5
- Bug: AWS::Serverless::Function `ImageUri` with map (ex: using `!Sub`) fails with type error HOT 7
- Access to internal enterprise host (Github entreprise) HOT 1
- Bug: sam deploy - ConnectionError HOT 2
- Bug: Invoke failed error=ErrAgentNameCollision HOT 4
- Bug: SAM Doesn't recognize changes related to intrinsic functions (#6610) HOT 1
- Bug: Error: The runtime 'provided.al2023' is unsupported. (golang) HOT 6
- `BuildMethod: esbuild` does not include bundled files HOT 2
- Bug: AWS::Events::Rule EventBusName -> 'name' member must satisfy regular expression pattern [\.\-_A-Za-z0-9]+ HOT 4
- Api Gateway requests with query string always response 400 HOT 3
- Bug: python 3.12 with setuptools installed and distutils still being required. HOT 5
- VStudio Debug for Typescript Lambda function gives Runtime.ImportModuleError HOT 7
- Feature request: Support for Python requirements files with different names HOT 3
- Bug: "sam build - TypeError" When building Docker Image from documentation HOT 1
- SamCli standard template with no modifications fails validation HOT 6
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 aws-sam-cli.