I have a EC2 server running Docker and I'd like to add the following to the User Data
so my private Dockerhub images will be pulled/run when the server starts up, like so:
#!/bin/bash
sudo docker run -p 3333:3333 -d --name Hello myusername/hello
But I'm unsure as to how to go about authenticating in order to gain access to the private repo myusername/hello
.
With Github you create and upload a deploy key, does Dockerhub offer a similar deploy key option?