# Mounting-Local-Files
DO NOT INCLUDE THE BELOW - IT'S FOR YOU, DELETE WHEN DONE
----
* You have a good user scenario below, keep it.
* Talk about taking the existing code from xxx and applying it to auto uploading to IPFS
* ...
What should happen:
- All files identified by the glob are converted (internally) into strings and attached to environment variables (use base64)
- These environment variables are run inside the docker container
- The first thing done inside the docker container is convert the files back to the original file names and filled with the original file content
- Then the command is run
What Vedant needs to do:
- Please rewrite this in correct grammar about what the problem is, what you want to do and how to solve it
- Discuss the various options you've thought about with pros/cons
- Talk about your proposed solution and the risks
- Add a note about the fact that context in WASM is doing something scary and we should change it
----
Adding scripts to IPFS and then mounting that script to run the script is a two step process
instead of this which requires 2 steps: upload your scripts to IPFS and then run the command
```
$ ipfs add hello.R
added QmQRVx3gXVLaRXywgwo8GCTQ63fHqWV88FiwEqCidmUGhk hello.R
20 B / 20 B [=====================================================================================================================================================] 100.00%
```
```
bacalhau docker run \
-v QmQRVx3gXVLaRXywgwo8GCTQ63fHqWV88FiwEqCidmUGhk:/hello.R \
r-base \
-- Rscript hello.R
```
instead this could be replaced by this
```
bacalhau docker run r-base -v hello.R:/hello.R -- Rscript hello.R
```
** PROBLEM **
https://stackoverflow.com/questions/653807/determining-c-executable-name
```
gcc -o gentext gentext.c
cc -o mainprog -Llib -lmymath firstbit.c secondbit.o
xlc -o coredump coredump.c
```
Luke’s suggestions
```
you could add support for "mounting" local files via the same mechanism used for uploading files in the python WASM backend, it can be a local file, so you can reuse that code (uploading the context as a tar file), so docker run -v $(pwd)/file:/file cat /file you'd expect this to work
making -v work with local paths would be the cleanest thing IMO
because that's no additional flags and it's also the same as how docker works
if cids can't have a / as the first character, you could just switch on that
(and always require an absolute path)
or support ./foo but I think docker doesn't
it it could use a configurable publisher
```
Other additions to this include
when we calculate the CID of a file/folder, if some file/folder are there on IPFS we don’t add them to IPFS ?
Other possible solutions
Instead of mounting local paths we can have a --upload path which uploads the pwd
There are too many flags currently this might confuse users instead we should use the --context-path flag in the python wasm backend
Previously discussed solutions to similar problems include **feature**