-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
12 lines (12 loc) · 3.12 KB
/
index.html
File metadata and controls
12 lines (12 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>docker.ctb</title>
<meta name="generator" content="CherryTree">
<link rel="stylesheet" href="res/styles4.css" type="text/css" />
</head>
<body>
<div class='page'><h1 class='title level-1'>Docker concept</h1><br/><p><ul><li>What is docker </li><li>init d </li><li>system d ( sherbimi cili menaxhon te gjitha serviset) ⇒user space (premission)</li><li>cri (container run interface) → cli tool </li><li>cni (container network interface)</li><li>volumes </li><li>docker registies → storage and distribution system for docker images </li><li>they create officials images</li><li>keep in mind you can look on the dockerhub to find officail images </li><li>like redis /sql etc..</li><li>main docker commands </li><li>to download images docker pull and the name of the image </li><li> : use for specifying the version of image </li><li>by deafult docker.io has all the images that we have download</li><li>docker images chechk the images that are installed</li></ul></p><p>→to run use the command docker run and the name of the image and the version and this starts the cotainer<ul><li>d you will see the container logs </p><p>→ docker ps shows the container that are running</li><li>-d stands for detach and runs the container without blocking the terminal </li><li>docker logs and the container id used to see the docker logs </li><li>docker it has docker isolated network </li><li>port binding is accesing container lik it is on my local host</li><li>docker stop and conatainer name stops the docker container</li><li>-p publish the container </li><li>for exp dcoker run -d -p 9000:80 and the name like ngnx so i can i acces the docker cointainer like it is on my local host </li><li> docker run actually creates a new container and it doesnt re-use the previous container </li><li>docker start and thew id of the container re start the the pre-created container </li><li>--name provides the specific name for our container</li><li>private docker registries are images that are cretated by company or anyone that they don't want to you to get it </li><li> docker reporsitor is to collect related images with same name but with different versions</li><li>our build docker images </li><li>simplified are called docker file </li><li>for example </li><li>from (this app):and the version</li><li>run will exxecute any command in a shell inside a container </li><li>for example</li><li>run python3 install for pyqt5</li><li>copy copies the files from <source> and adds them to the container </li><li>command is like : copy python.file /app/</li><li>copy src /app/</li><li>workdir sets the working directory for all the following commands</li><li>like workdir /app</li><li>cmd executes the instauction that is to be executed when a docker container starts </li><li>and there be only one "cmd: instuction in a docker file</li><li>for emaple</li><li>cmd [" python, “and the procduct "]</li><li>docker build builds the conatiner </li><li>-t is tag sets a name and optionally tag in the name:tag format </li><li></li></ul></p></div>
</body>
</html>