I am a newbie to docker. I am trying to deploy a R app as a docker image. I am able to deploy the app in docker by mounting the folder. But I don't think that is going to work in AWS. I am thinking of storing my app in s3 and adding it during the build by ADD command. But it is throwing me this error : ADD failed: stat /var/lib/docker/tmp/docker-builder441270805/s3:/bucket_name/app: no such file or directory
Can you guys please give me any idea on how to do it ? Thanks
Once the image is tagged we are good to push. Using the docker push command let's push the image. We are successfully able to push image to registry running on kunbernetes and stored on S3.
We are using an S3 bucket as docker registry. If we want to use it in an instance or on premise server, we setup registry & then use it.
The more efficient and cost-effective option is to use AWS's S3 service for storing the image files. Using S3 is a very low-cost option. Effectively, all you are paying for is transferring files into an S3 bucket and serving those images to your users.
You can have an unlimited number of objects in a bucket. Before you can upload files to an Amazon S3 bucket, you need write permissions for the bucket. For more information about access permissions, see Identity and access management in Amazon S3. You can upload any file type—images, backups, data, movies, etc.
This doesn't work because /var/lib/docker/tmp/docker-builder441270805/s3:/bucket_name/app
is not a valid path, docker simply can't find anything there.
Possible solutions:
Option 1 has the advantage of having to change very little to your current workflow while option 2 would allow anyone with access to the bucket to be able to build the dockerfile without having to do anything to the underlying os / file structure.
Note downloading the files from s3 might not always work, the docker cache is rather aggressive and may cause issues when you want the updated output to make it into a new container.
For more info see this blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With