Giter Site home page Giter Site logo

docker's Introduction

Docker

All Docker fundamental cheatsheet from Cliff Kwok

Start the docker

very first command

docker

Check version

docker --version

Image

docker pull <> # download images docker images # check existing images in docker

Run

docker run <<image name + tag>> docker run -d <<image name + tag>> # means that a Docker container runs in the background of your terminal docker run -d -p 8080:80 <<image name + tag>> # My computer (host port) is 8080 which can access container 80 docker run -d -p 8080:80 -p 3000:80 <<image name + tag>> # 2 local port to same container port docker run --name <> -d -p 8080:80 -p 3000:80 <<image name + tag>> docker run --name <> -v $(pwd):/root/docker -d -p 8080:80 -p 3000:80 <<image name + tag>>

Container

docker container ls # check running container docker ps # check running container (quick way) docker ps -a # check all contianer (show all) docker stop <> docker stop <> docker start <> docker rm <> # remove individual container docker ps -aq # show all container id docker rm $(docker ps -aq) # delete all exisiting container docker rm -f $(docker ps -aq) # delete all exisiting container

! # every time start a container, it create new container id

Quit

Control + C # quit when in status of running container Control pq

Exec

docker exec -it <> bash

Create file

touch about.html

docker's People

Contributors

cliffkwok avatar

Watchers

James Cloos avatar  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.