Search code examples
amazon-web-servicesdockeramazon-ec2amazon-ecsdocker-registry

How to auto login into website using AWS private repository?


I have a private repository that I have already docker pushed my image into.

Here is my one image in this repository: enter image description here

However, when I got into the url, this shows up

enter image description here

How do i make it so that this doesn't show up? (And also, what do the mean by username and password? my IAM user doesn't have a password, only access key id and secret key as far as I know)


Solution

  • You're not supposed to just copy the image link and paste into your browser.

    You configured your username and password when you logined via docker (I'm assuming, since your image is successfully pushed)

    This means that your username and password is configured WITHIN your docker container and NOT in the "real world" i.e. outside your docker container.

    The next steps you should take are:

    1. Pull that url as a docker image

    docker pull <url>

    ^ the <url> is whatever the link in the photo is (can't see because it's censored)

    1. docker images

    From this command, find the image id of the image you just pulled

    1. docker run -d -p <port>:<port> <imageid>

    2. docker ps should help you figure out the correct link you should be copy and pasting into your browser.