DEV Community

Arun Kumar for AWS Community Builders

Posted on

2 1

Docker setup on Windows

Steps

a. Install Docker Desktop for Windows.

[https://hub.docker.com/editions/community/docker-ce-desktop-windows]

b. Install WSL2.

[https://docs.microsoft.com/en-us/windows/wsl/install-win10]

c. Make sure awscli is up to date.

[https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html]

d. Run the following command to login to the ECR repo.

aws ecr get-login-password --region <aws-region> | docker login --username AWS --password-stdin <ecr-repo-name>
Enter fullscreen mode Exit fullscreen mode

Or if you are using an older awscli, you can try

aws ecr get-login --no-include-email --region <aws-region> > ./run.sh
Enter fullscreen mode Exit fullscreen mode

Then run the shell file — run.sh

e. If you encounter error in step 4 (d) →

"Error saving credentials: error storing credentials - err: exit status 1"

then you need to rename the following exe file.

1

And also rename ~/.docker/config.json to ~/.docker/config.json.original

Run the shell script run.sh again.

Copy AWS ECR repo between 2 AWS accounts

a. To pull a repo:

docker pull <repo/image>
Enter fullscreen mode Exit fullscreen mode

b. Create the same repo in second account.

aws ecr create-repository — repository-name <repo-name> --profile account2
Enter fullscreen mode Exit fullscreen mode

c. Tag the image and push to target repo.

docker tag <account1-image> <account2-image>
Enter fullscreen mode Exit fullscreen mode
docker push <account2-image>
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Create a simple OTP system with AWS Serverless cover image

Create a simple OTP system with AWS Serverless

Implement a One Time Password (OTP) system with AWS Serverless services including Lambda, API Gateway, DynamoDB, Simple Email Service (SES), and Amplify Web Hosting using VueJS for the frontend.

Read full post

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay