sekka1 / aws-cli-docker Goto Github PK
View Code? Open in Web Editor NEWDocker container with the AWS CLI
License: MIT License
Docker container with the AWS CLI
License: MIT License
Hi,
I am trying to upload some files from my docker container to s3 bucket which is managed by rook. But while uploading it is not able to detect exact path for the object.
docker run --env AWS_ACCESS_KEY_ID=xyz --env AWS_SECRET_ACCESS_KEY=abc garland/aws-cli-docker aws --endpoint-url https://s3.company.com --no-verify-ssl s3 cp filename.txt s3://teamfelgen/test/
Result
The user-provided path filename.txt does not exist.
But I am in the same folder where this file is present.
Also I tried to put exact path from home directory like
~/piyush/filename.txt
/piyush/filename.txt
Note: Same command with aws cli is working as expected
aws --endpoint-url https://s3.company.com --no-verify-ssl s3 cp filename.txt s3://teamfelgen/test/
I'm looking at trying to use the new aws ecr put-image-scanning-configuration
command but need v1.17.4 of the AWS CLI which is not supported here yet. Happy to raise PR if needed.
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
awscli latest a9875f2afd9b 4 seconds ago 93.69 MB
docker run \
-d \
--env AWS_ACCESS_KEY_ID=KEY \
--env AWS_SECRET_ACCESS_KEY=SECRET \
--env AWS_DEFAULT_REGION=sa-east-1 \
-v /opt/database:/opt/database \
garland/aws-cli-docker \
aws s3 cp s3://sbacem-db/$(aws s3 ls s3://sbacem-db --recursive | sort | tail -n 1 | awk '{print $4}') /opt/database/
I am running the following script. (intentionally i hide the keys of course).
It is basically a copy paste from the readme.md
.
I have windows 10.
I am running this script on git bash enviroment.
my docker version is 18.03.1-ce
docker container run \
--env AWS_ACCESS_KEY_ID=aaaaaaa \
--env AWS_SECRET_ACCESS_KEY=bbbbbbb \
-v $PWD:/data \
garland/aws-cli-docker \
aws s3 sync . s3://www.typing-coacher.net
i am getting the following error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Mount denied:
The source path "C:/projects/docker;C"
doesn't exist and is not known to Docker.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
the folder path that actually exist is: C:/projects/docker
Hello
In my docker-compose.yml, I have:
...
aws-cli:
image: garland/aws-cli-docker
environment:
- AWS_ACCESS_KEY_ID=
- AWS_SECRET_ACCESS_KEY=
- AWS_DEFAULT_REGION=eu-west-1
links:
- s3-service
- sqs-service
command: >
sh -c "aws --endpoint-url=http://s3-service:4569 s3 mb s3://bucket1 &&
aws --endpoint-url=http://s3-service:4569 s3 mb s3://bucket2"
When I'm checking created buckets with:
aws s3 ls s3://
got:
s3-service
and then
aws s3 ls s3://s3-service/
bucket1
bucket2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.