Javatpoint Logo
Javatpoint Logo

Docker Ubuntu Example

Docker also allows us to install any operating system in isolated container. Here, in the following example, we are installing Ubuntu in Docker.

  1. Create a directory to organize files.
  2. Docker Ubuntu application 1
  3. Change the directory
  4. Docker Ubuntu application 2
  5. Create Dockerfile
  6. In the file, we are using only one instruction that will pull the Ubuntu image from Docker hub.

    // Dockerfile

  7. Create a Docker Image
  8. Docker Ubuntu application 3
  9. Run Docker Image
  10. The image, we have created is run by the following command.

    Docker Ubuntu application 4
  11. See Running Container
  12. This command is used to see the all running Docker container.

    Docker Ubuntu application 5
  13. Enter into Docker Container
  14. We can enter into the running container and can check the files and application inside the container.

    Docker Ubuntu application 6
  15. See Ubuntu OS Directory Structure
  16. After entering into

    Docker Ubuntu application 7
  17. Executing Commands
  18. Docker Ubuntu application 8






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA