Giter Club home page Giter Club logo

basic_docker_tutorial's Introduction

basic_docker_tutorial

This repository is a super quick docker recipe- set ups, installation and running a super basic hello-world container, for people in a hurry :) You can watch this amazing helpful tutorial video when you have 3+ hours at length: https://docs.docker.com/get-started/

1. Install docker

Follow steps from official website https://docs.docker.com/desktop/install/linux-install/

2. Create a dockerhub account at

https://hub.docker.com/

3. Follow the steps docker_passphrase_steps.txt to generate docker_passphrase.

4. Write a dockerfile

The docker file takes a base ubuntu image (from dockerhub) We add our own layers on top of this base images. We add our source codes, install dependencies, enviroment variables, commands. etc.

For now we just want to exceute a command using CMD to echo Hello World and test if this runs.

Thats all!

5. Build the image from dockerfile

 docker build --tag hello-docker .

Alt text

6. List all docker images in your system

docker images

Alt text

3. Run the image as container

docker run -d -p 5002:5002 hello-docker

4. Check on Docker Desktop

Checkt the last container with tag hello-docker. It ran and exited.

Alt text

On click opening the container link you can see that it echoed 'Hello World' inside the container

Alt text

Congrats. You are now all set to create some meaningful container images adding dependencies and code in it.

You can check my example of running a flask app in docker here: https://github.com/nausheenfatma/basic_flask_docker_tutorial

basic_docker_tutorial's People

Contributors

nausheenfatma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.