Comments (8)
Should be able to keep it the same. Try adjusting the cp to use /app/filename.txt
, as that’s where the mount is.
from aws-cli-docker.
Hi @pkhetan! You’re seeing that problem because the file isn’t Avila me inside the container. So, to solve it, mount the current directory into the container. Using the -v
option. Here’s an example...
docker run -v $(pwd):/app --env AWS_ACCESS_KEY_ID=xyz --env AWS_SECRET_ACCESS_KEY=abc mikesir87/aws-cli aws --endpoint-url https://s3.company.com --no-verify-ssl s3 cp filename.txt s3://teamfelgen/test/
from aws-cli-docker.
I am getting the same error. Do I need to replace anything or keep it exactly same.
"-v $(pwd):/app"
from aws-cli-docker.
Got it exactly like I wanted. Thanks a lot!
from aws-cli-docker.
Ah! Remembered the default working directory wrong. If you adjust the mount to $(pwd):/AWS
, then you don’t have to adjust the file path in the cp command. Sorry about that!
from aws-cli-docker.
What about windows. How do we mount on windows.
from aws-cli-docker.
Good question! I haven't tried it (as I don't have a Windows machine), but based on the link below, it looks like the mount spec above should still work on Windows. Note that the image isn't multi-architecture, so would have to run in a similar way as other Linux-based containers on Windows.
https://stackoverflow.com/a/41489151/502139
from aws-cli-docker.
Going to close as this has been hanging around for a while and I successfully upload via S3 quite often. Feel free to reopen if you're still having issues.
from aws-cli-docker.
Related Issues (12)
- user process caused "exec format error" HOT 8
- [Gitlab CI] [Latest image 1.16.173] HOT 3
- Using aws-cli in Kubernetes pod
- Release 2.0.0 Build Failing HOT 2
- Install wget in this image HOT 5
- add unzip to v2 HOT 3
- [Errno 2] No such file or directory: '/root/.aws/credentials' on macOS HOT 1
- debian-security stable/updates Release does not have a Release file.
- No tag for version 1.14.9 HOT 3
- Problem with configure command in documentation, returns EOF HOT 2
- Set entrypoint to aws HOT 1
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-cli-docker.