- Make sure that your source code is checked into Github. Check in the DockerFile in the root of the repository.
- Create a account in DockerHub at https://hub.docker.com/.
Create a new repository and connect your github repository.
Click Create & Build. With this, when new changes are checked into your Github repository it will be automatically build in DockerHub and a new image created.
Create a new account\Login in Digital Ocean.
Create a new Droplet.
Select Docker and select the 5$\month plan. Select One time password for Authentication.
Click create Droplet.
After the droplet is created, click the droplet.
Then click the console link on the right hand side.
In the console window, login into the your droplet using the login id and one time password, provided in email. You will be asked to change the password.
To install the application, in the console window, login into docker hub using the following command:
login docker
pull the image for your application using the following command:
docker pull ajitgoel/socialmediascrubber
To run the docker image, use the following command:
docker run –p 80:80 ajitgoel/socialmediascrubber
your website should now be visible at
http://<PublicIpAddress>
3 Comments
I’ve just did it but I’m unable to browser my app with web browser. What I don’t understand is that I do the run command and I get no message back. After that I type “docker container ls” and there is no container listed. I tough that the run command was going to create a container. Is this supposed to be the case?
Hello Mathieu,
This seems to be an issue with Docker Hub. Sorry, I might not be able to help further.
I think the step to login to docker should be to type “docker login”, not “login docker” in the console.