Giter VIP home page Giter VIP logo

docker_made_easy's Introduction

Docker_made_easy

Terminal My experience of learning docker. I have listed all the commands which I encountered and are useful in real life while using docker, other commands can be accesed using docker --help.

Step by step guide

  1. Download docker setup on your OS.

  2. Setup you account on dockerhub .

  3. Pull your first image from dockerhub.

  $ docker run alpine
  1. For checking the details of images
  $ docker images
  1. List of all the running containers
  $ docker ps -a
  1. To stop alpine
  $ docker stop alpine
  1. To create an container
  $ docker create alpine 
  1. To remove a container
  $ docker kill alpine
  1. To remove an image
  $ docker rmi <image_name>
  1. To force remove an image
  $ docker rmi -f <image_name>

To build your own image

Make a dockerfile in your repository for which you want to make the image. Open the docker file and write following into it :

FROM python:3.6

MIANTAINER Innovative Coder

EXPOSE 8000

#install dependencies
COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt

#Run the code

CMD ["python3 <filename>"]

instead of filename write the name of file you want to compile above code can be edited on the basis of the language chosen

And then build the image using

  $ docker build docker_

lets say name of the folder be docker_

Pulling an Image from Dockerhub say for example jcdemo/flaskapp {an image for flask}

 $ docker pull jcdemo/flaskapp

References

Official documentation : https://docs.docker.com/compose/reference/

Feel free to contribute!!

docker_made_easy's People

Contributors

innovativecoder avatar

Watchers

 avatar

Forkers

danish45007

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.