<center><img src="https://www.docker.com/sites/default/files/vertical.png"></center> <center><sup><a href="https://www.docker.com/legal/brand-guidelines">The original Docker logo</a></center> *** I am not a devops engineer means that I am not into the deployment things, however, I want to learn about the Docker. Also I want to utilize it in the development setup on our software team. Therefore, I have started to learn it from the ground. I will publish my notes about it in the process. #### General info *** - Unlike the virtualization, Docker has *containerization*. Containers share the same kernel of the host. - It's much faster and lightweight compared to virtualization. - Docker has [public images](https://hub.docker.com/) you can download and use. Example: ```docker run centos``` uses the official image centos. If it's not installed in the host, it will download from the docker hub. - Docker containers exit automatically after running if there is no running process left. #### Commands *** ```docker ps``` Shows the running containers ```docker ps -a``` Shows all containers including the exited ones. ```docker rm <container_id_or_name>``` Removes the container. Tip: You don't need to write IDS full, write a couple of chars from the beginning. Example: ``` ➜ ~ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b26772f74f32 ubuntu:14.04 "/bin/bash" 3 seconds ago Exited (0) 14 seconds ago xenodochial_hoover 2b8393811355 ubuntu:14.04 "/bin/bash" 6 seconds ago Exited (0) 17 seconds ago determined_agnesi ➜ ~ docker rm 2 2 ➜ ~ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b26772f74f32 ubuntu:14.04 "/bin/bash" 11 seconds ago Exited (0) 23 seconds ago xenodochial_hoover ``` ```docker images``` Shows the installed images ```docker rmi <image>``` Removes the image. If there is a container running based on the image, you need to stop the container first. ```docker pull image``` Pulls the image from docker hub. It can be also ```username/imagename``` for unofficial images. ```docker stop <container>``` Stops the running container. ```docker run <container> <command>``` Starts a container and runs the command. Ex: ```docker run ubuntu:14.04 cat /etc/*release*``` Note: if you want to run in detached, use -d param. ```docker exec <container_id> cat /etc/passwd``` Execute commands on running containers. ```docker run -it <image> ``` Creates a container from the image, runs an interactive TTY. (shell)
post_id | 63,980,394 |
---|---|
author | emrebeyler |
permlink | docker-notes-1 |
category | docker |
json_metadata | {"users":[],"format":"markdown","links":["https:\/\/www.docker.com\/legal\/brand-guidelines","https:\/\/hub.docker.com\/"],"community":"busy","app":"busy\/2.5.6","image":["https:\/\/www.docker.com\/sites\/default\/files\/vertical.png"],"tags":["docker","programming","containers","busy"]} |
created | 2018-10-10 07:38:33 |
last_update | 2018-10-10 07:42:42 |
depth | 0 |
children | 5 |
net_rshares | 5,480,384,197,721 |
last_payout | 2018-10-17 07:38:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 5.913 SBD |
curator_payout_value | 1.632 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,818 |
author_reputation | 319,480,565,467,431 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bobbylee | 0 | 561,935,257,381 | 25% | ||
inertia | 0 | 1,949,495,404,285 | 100% | ||
sambillingham | 0 | 21,676,457,466 | 100% | ||
busy.pay | 0 | 709,714,082,154 | 3.59% | ||
decebal2dac | 0 | 7,911,785,859 | 100% | ||
toninux | 0 | 225,205,645 | 24.5% | ||
malay11 | 0 | 621,214,452 | 24.5% | ||
ruel.cedeno | 0 | 20,015,401,736 | 100% | ||
pibara | 0 | 27,142,472,611 | 100% | ||
lastozgur | 0 | 4,942,457,328 | 100% | ||
firatozbek | 0 | 4,477,558,060 | 100% | ||
finanzasid | 0 | 555,800,896 | 100% | ||
make-a-whale | 0 | 42,191,695,246 | 6.6% | ||
boontjie | 0 | 1,489,162,820 | 100% | ||
sbdraffle | 0 | 203,983,563 | 42% | ||
smafey | 0 | 339,077,026 | 24.5% | ||
espoem | 0 | 34,122,991,806 | 30% | ||
isnochys | 0 | 6,953,995,418 | 13% | ||
rightscomet | 0 | 83,566,414 | 24.5% | ||
murattatar | 0 | 3,939,474,208 | 15% | ||
nudgent | 0 | 98,554,147 | 24.5% | ||
elchin | 0 | 693,751,013 | 100% | ||
emrebeyler | 0 | 1,591,175,514,326 | 100% | ||
mrmaracucho | 0 | 223,664,891 | 49% | ||
evilest-fiend | 0 | 1,694,115,814 | 50% | ||
tentalavera | 0 | 127,762,874 | 5% | ||
forkonti | 0 | 536,102,000 | 100% | ||
mesafe | 0 | 7,270,124,928 | 100% | ||
hellowhale | 0 | 153,971,431 | 100% | ||
enjoyy | 0 | 208,508,039 | 24.5% | ||
berkerpeksag | 0 | 1,575,366,877 | 100% | ||
aydant | 0 | 5,422,250,803 | 100% | ||
tinowhale | 0 | 2,479,830,855 | 49% | ||
ewq | 0 | 208,466,234 | 6% | ||
lukecreed | 0 | 177,795,976 | 24.5% | ||
fromhell2sky | 0 | 8,061,148,698 | 24.5% | ||
leticiapereira | 0 | 528,297,394 | 100% | ||
sauronbey | 0 | 3,629,924,457 | 100% | ||
googletr | 0 | 139,636,367 | 100% | ||
curtaintwitcher | 0 | 6,206,272,601 | 100% | ||
chorock | 0 | 34,471,572,865 | 8% | ||
canburaksimsek | 0 | 1,305,419,957 | 25% | ||
neokuduk | 0 | 1,354,009,359 | 100% | ||
muradovv | 0 | 662,466,710 | 5% | ||
dervisturgut | 0 | 57,252,546 | 12.5% | ||
uzerebru | 0 | 115,799,231 | 41% | ||
uzercanan | 0 | 142,699,218 | 45% | ||
ahmetmertugrul | 0 | 830,328,608 | 100% | ||
dirapa | 0 | 706,804,981 | 7% | ||
giftbox | 0 | 191,089,373 | 100% | ||
faithvarron | 0 | 96,365,910 | 24.5% | ||
tipitip | 0 | 623,943,110 | 100% | ||
raoul.poenar | 0 | 963,062,158 | 100% | ||
akifane | 0 | 499,908,036 | 100% | ||
samanyolu | 0 | 126,578,666 | 30% | ||
gjones15 | 0 | 452,006,218 | 24.5% | ||
nagaclub | 0 | 92,441,275 | 24.5% | ||
ruh | 0 | 650,573,360 | 100% | ||
tolgahanuzun | 0 | 10,614,054,499 | 100% | ||
muratkbesiroglu | 0 | 305,227,528,192 | 100% | ||
sereze | 0 | 949,157,469 | 100% | ||
zcool | 0 | 187,674,105 | 10% | ||
carment | 0 | 98,421,220 | 24.5% | ||
victorcovrig | 0 | 3,078,589,067 | 50% | ||
qurator-tier-0 | 0 | 3,786,739,151 | 2.5% | ||
feronio | 0 | 1,305,017,512 | 100% | ||
hyroniz | 0 | 101,450,224 | 25% | ||
rechellomataro | 0 | 72,092,513 | 24.5% | ||
steeman220 | 0 | 78,311,164 | 24.5% | ||
kryptorero | 0 | 100,346,336 | 24.5% | ||
bahagia9 | 0 | 76,909,329 | 24.5% | ||
gydronium | 0 | 128,734,937 | 29.4% | ||
senseofhumor | 0 | 558,963,922 | 100% | ||
bilimkurgu | 0 | 43,767,783,395 | 100% | ||
hahajin | 0 | 0 | 100% | ||
parakazan | 0 | 213,132,397 | 100% | ||
sbd-fairy | 0 | 225,790,835 | 49% | ||
emmywell | 0 | 90,341,607 | 24.5% | ||
sulwati | 0 | 78,368,985 | 24.5% | ||
sutter | 0 | 473,206,122 | 24.5% | ||
farukyegul | 0 | 75,353,704 | 12.5% | ||
tsonkomirchev | 0 | 477,047,904 | 100% | ||
beemtutorials | 0 | 404,743,884 | 100% | ||
gokhan.karaboga | 0 | 396,666,565 | 100% | ||
ali.yuce | 0 | 1,080,380,200 | 100% | ||
alvinvoo | 0 | 856,205,449 | 100% | ||
cryptobutton | 0 | 73,803,495 | 24.5% | ||
nfc | 0 | 9,010,770,596 | 1% | ||
ozgurcinarli | 0 | 814,608,608 | 100% | ||
finallynetwork | 0 | 23,731,763,260 | 100% | ||
bingu | 0 | 259,815,395 | 100% |
```docker start $(docker ps -a --format "{{.ID}}")``` Aktif çalışma dizinimdeki containerları kaldırmak için kullandığım bir komut. Bazen kalabalık bir container listesi olunca böyle minik betikler yazmak/kullanmak hoşuma gidiyor. :)
post_id | 63,981,535 |
---|---|
author | tolgahanuzun |
permlink | re-emrebeyler-docker-notes-1-20181010t080659679z |
category | docker |
json_metadata | {"app":"steemit\/0.1","tags":["docker"]} |
created | 2018-10-10 08:06:57 |
last_update | 2018-10-10 08:06:57 |
depth | 1 |
children | 1 |
net_rshares | 20,717,393,312 |
last_payout | 2018-10-17 08:06:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.021 SBD |
curator_payout_value | 0.006 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 234 |
author_reputation | 14,417,464,439,057 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
emrebeyler | 0 | 15,379,277,336 | 1% | ||
aydant | 0 | 5,338,115,976 | 100% |
güzel trick. ✌️
post_id | 63,981,657 |
---|---|
author | emrebeyler |
permlink | re-tolgahanuzun-re-emrebeyler-docker-notes-1-20181010t081006657z |
category | docker |
json_metadata | {"app":"steemit\/0.1","tags":["docker"]} |
created | 2018-10-10 08:10:09 |
last_update | 2018-10-10 08:10:09 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-10-17 08:10:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 15 |
author_reputation | 319,480,565,467,431 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
One year old !BEER
post_id | 80,747,960 |
---|---|
author | isnochys |
permlink | re-docker-notes-1-20191010t045720z |
category | docker |
json_metadata | {"app":"beem\/0.21.1"} |
created | 2019-10-10 04:57:27 |
last_update | 2019-10-10 04:57:27 |
depth | 1 |
children | 1 |
net_rshares | 0 |
last_payout | 2019-10-17 04:57:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 18 |
author_reputation | 36,963,899,244,133 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
beerlover | 0 | 0 | 0.01% |
_
post_id | 97,526,847 |
---|---|
author | isnochys |
permlink | re-re-docker-notes-1-20191010t045720z-20220211t224438z |
category | docker |
json_metadata | {"app":"beem\/0.24.26"} |
created | 2022-02-11 22:44:42 |
last_update | 2022-02-11 22:44:42 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2022-02-18 22:44:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1 |
author_reputation | 36,963,899,244,133 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
<div class='pull-right'>https://cdn.steemitimages.com/DQmaHThyECGhEx8tSfHZbiMFRNYjJ35K92cDgiJjkzBUaJo/One%20sip%20of%20BEER%20for%20you.gif<p><sup><a href='https://steem-engine.com/?p=market&t=BEER'>View or trade </a> <code>BEER</code>.</sup></p></div><center><br><br> <p> Hey @emrebeyler, here is a little bit of <code>BEER</code> for you. Enjoy it!</p> </center>
post_id | 80,747,966 |
---|---|
author | beerlover |
permlink | re-docker-notes-1-20191010t045743z |
category | docker |
json_metadata | {"app":"beem\/0.21.1"} |
created | 2019-10-10 04:57:45 |
last_update | 2019-10-10 04:57:45 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2019-10-17 04:57:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 365 |
author_reputation | 16,011,958,080,429 |
root_title | "Docker notes #1" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |