Getting Started with Docker

nikital2022

NikitaL2022

Posted on March 1, 2022

Getting Started with Docker

Why is Docker so Powerful?

  • Docker is essential for developers in building, deploying, running, updating, and stopping containers. A container is an executable package of software. Docker makes it easier and safer to create containers than without it.

How to Start

  • First, you will need to create an account Here.

  • Then you go to the terminal, click New Instance and run git clone https://github.com/heyMP/news-api-workshop && cd news-api-workshop in the terminal.

  • Then, you run cp dot.env.example dot.env in order to get a new copy of environment settings.

Image description

  • This creates a file dot.env. Then you click Editor and find the dot.env file. You will need to get an API key and public url.

  • Go to API KEY, create an account, and it will generate your personal key.

Image description

  • You take your personal API key and replace it in the dot.env and SAVE.

Image description

  • Now you click PORT and enter 4000 and click ok.

Image description

  • It should show page isn't working.

Image description

  • You can take the url and and put it here NEWS_ENDPOINT= in dot.env.

  • Finally, you can run docker-compose up. Ports 80 and 4000 pop up and you can click 4000 to see the application.

Image description

Here is the link I followed.

💖 💪 🙅 🚩
nikital2022
NikitaL2022

Posted on March 1, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related