Giter VIP home page Giter VIP logo

docker-commands's Introduction

Docker-Commands

Basic docker commands

What is contaner?

  • Lightweight, standalone and executable software package that includes everything needed to run a peace of software.
  • Containers are designed to provide a consistent are repoducible environment accross different platforms are development stages.
  • Simplifies development, deployment and scaling.

Containers benifits

  • Consistency
  • Portability
  • Resource Efficiency
  • Scalability
  • Versioning and Rollback

What are containers?

  • Containers Repository
  • Private Repositories
  • Public Repository

Virtual Machine and Docker Container

##todo

What is docker container?

##todo

Check Docker version -

docker -v

How to pull container?

docker pull postgres

image

Two ways to check docker images

docker images

How to run docker?

  1. docker run <image_name>
  2. docker run -d <image_name> (-d means detach mode)

After getting this error run this code

docker run -e POSTGRES_PASSWORD=password postgre

How to find what are the running docker containers docker ps

How to stop running docker stop <container_id>

How to load and all containers (running/stop) (-a means all) docker ps -a

Each time you execut docker run command it will create a new docker container

Docker Architecture

##todo

How to run same container without creating new container docker start <container_id>

how to find logs docker logs <docker_name>

Keep listing logs docker logs -f sweet_sanderson

How to go to inside docker container docker exec -it <container_name> psql -U postgres exec - execute -it - internal terminal psql - postgresql -U - User postgres - username

how to exit the containr exit

how to customize container name when running container (-e means enviorenment) docker run --name <customise_name> -e POSTGRES_PASSWORD=password postgres

how to run docker container on detach mode ( -d means detach) docker run -d --name <customize_name> -e POSTGRES_PASSWORD=password postgres

how to remove docker container docker rm <container_id> rm - remove

how to remove docker image docker rmi <image_id> rmi - removde image id

How to pull specific image versions docker pull redis:6.2

docker-commands's People

Contributors

navod 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.