Coder Social home page Coder Social logo

docker's Introduction

docker

Explore 🐳 Docker

cheat sheet

installation

  • update your existing list of packages
$ sudo apt update
  • install a few prerequisite packages which let apt use packages over HTTPS
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
  • add the GPG key for the official Docker repository to your system
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • add the Docker repository to APT sources
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
  • update the package database with the Docker packages from the newly added repo
sudo apt update
  • make sure you are about to install from the Docker repo instead of the default Ubuntu repo
$ apt-cache policy docker-ce
  • install Docker
$ sudo apt install docker-ce
  • docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running
$ sudo systemctl status docker

(Optional) executing the Docker Command Without Sudo: Post-installation steps for Linux

$ sudo usermod -aG docker ${USER}
# log out and log back in so that your group membership is re-evaluated

install Docker Compose

container

Docker file

  • RUN : Để thực thi một câu lệnh nào đó trong quá trình build images.
  • CMD : Để thực thi một câu lệnh trong quá trình bật container. Mỗi Dockerfile chỉ có một câu lệnh CMD, nếu như có nhiều hơn một câu lệnh CMD thì chỉ có câu lệnh CMD cuối cùng được sử dụng.

Một câu hỏi đặt ra là nếu tôi muốn khởi động nhiều ứng dụng khi start container thì sao, lúc đó hay nghĩ tới ENTRYPOINT

  • ENTRYPOINT: Để thực thi một số câu lệnh trong quá trình start container, những câu lệnh này sẽ được viết trong file .sh.

documents

😋 Awesome

docker's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

docker's Issues

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.