Giter Club home page Giter Club logo

Comments (8)

mikesir87 avatar mikesir87 commented on August 16, 2024 2

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.

mikesir87 avatar mikesir87 commented on August 16, 2024 1

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.

pkhetan avatar pkhetan commented on August 16, 2024

I am getting the same error. Do I need to replace anything or keep it exactly same.
"-v $(pwd):/app"

from aws-cli-docker.

pkhetan avatar pkhetan commented on August 16, 2024

Got it exactly like I wanted. Thanks a lot!

from aws-cli-docker.

mikesir87 avatar mikesir87 commented on August 16, 2024

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.

pkhetan avatar pkhetan commented on August 16, 2024

What about windows. How do we mount on windows.

from aws-cli-docker.

mikesir87 avatar mikesir87 commented on August 16, 2024

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.

mikesir87 avatar mikesir87 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.