Publishing Docker to AWS from Visual Studio
I want to publish my Docker container to AWS using the Visual Studio interface. I want to specify a custom Docker profile in Visual Studio. I can’t seem to connect to AWS that way, though. (Validate Connection always fails.) Is this possible?
I am able to docker build, push to Docker Hub, ssh into my EC2 server (living within ECS), and successfully docker pull, but I’d really like to simplify the process and bypass Docker Hub if possible.
tcp://[my ec2 server]:2376 as the Server URL. I specified the other fields as appropriate. Do I need to specify particular Auth or Run options?
One Solution collect form web for “Publishing Docker to AWS from Visual Studio”
It depends on which AWS region you’re using. ECS has a “Repositories” host, sibling to the Clusters and Task Definitions, that’s available (for now) only to us-east-1 and us-west-2. When you create a repository, at the top of the page there’s an expandable header titled, “Build, Tag, and Push Docker Image”. It will give you the instructions for pushing the image.
The Amazon ECS Developer Guide has a “Repositories” page for more information.
Tip: trying to login was not immediately clear from the instructions. Running the aws ecr get-login command will respond with the entire login command that you’ll need to execute, but it’s an extremely long command. You have to be familiar with copy-and-paste in the terminal. (I was not.)
To copy-and-paste in the terminal,
- Click the icon in the top left of the window.
- Select Edit > Mark.
- Highlight the full width of all the rows.
- Select Edit > Copy.
- Open notepad, and paste the text.
- Remove all line breaks.
- Copy everything back to the terminal at the command line (Edit > Paste).
- Run the command, and you should now be able to follow the rest of the instructions.