<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> *** We continue to learn Docker. See the [first part](https://steemit.com/docker/@emrebeyler/docker-notes-2), [second part](https://steemit.com/docker/@emrebeyler/docker-notes-2) on the learning notes. #### docker compose A tool for running multi-container application. An application may need postgresql, redis, or any other 3rd party servers. Building all of them inside a single container doesn't make any sense in practical. Example: Running two containers; first one is the web app, second one is the mongodb instance. (filename convention: ```docker-compose.yml```. *** ``` services: web: image: "emrebeyler/my-web-app" database: image: "mongodb" ``` *** use ```docker compose up``` to run the containers. ###### Port mapping *** *** ``` services: web: image: "emre/my-web-app" ports: - "80:5000" ``` *** ###### Volume mapping *** ``` services: database: image: "mongodb" volumes: - /opt/data:/var/lib/mongodb ``` *** ###### Stop or Remove containers *** - ```docker-compose stop``` to stop containers. - ```docker-compose down``` to stop everything and remove the containers entirely. ###### Passing environment files to containers *** ``` services: database: image: "mongodb" environment: - MYSQL_ROOT_PASSWORD=password ``` *** It's also possible to set a environment file: *** ``` web: env_file: - web-variables.env ``` *** It's a good practice to share the configuration information via environment variables. ##### Placing dependencies on containers *** It's not a good idea to fire up the web app before the database. *** ``` version: '3' services: web: depends_on: - db db: image: postgres ``` *** docker compose will start the postgres first, and web later since it. It follows the dependency order. ##### Networking between services *** By default, every service can reach each other by their image names. No need to know which IP they operate on. *** ``` version: '3' services: web: depends_on: - db db: image: postgres ``` *** web service can reach the postgres server by using ```postgres://db:5432``` as a connection string.
post_id | 64,463,221 |
---|---|
author | emrebeyler |
permlink | docker-notes-3 |
category | docker |
json_metadata | {"format":"markdown","image":["https:\/\/www.docker.com\/sites\/default\/files\/vertical.png"],"tags":["docker","programming","devops","containers","busy"],"community":"busy","app":"busy\/2.5.6","users":["emrebeyler"],"links":["https:\/\/www.docker.com\/legal\/brand-guidelines","https:\/\/steemit.com\/docker\/@emrebeyler\/docker-notes-2","https:\/\/steemit.com\/docker\/@emrebeyler\/docker-notes-2"]} |
created | 2018-10-18 07:55:54 |
last_update | 2018-10-18 07:55:54 |
depth | 0 |
children | 12 |
net_rshares | 3,023,336,517,164 |
last_payout | 2018-10-25 07:55:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.810 SBD |
curator_payout_value | 0.735 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,473 |
author_reputation | 319,480,565,467,431 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
freyman | 0 | 13,650,182,732 | 100% | ||
votehumanity | 0 | 1,019,917,788 | 24.5% | ||
eforucom | 0 | 2,013,714,764 | 1% | ||
busy.pay | 0 | 727,616,065,169 | 3.59% | ||
decebal2dac | 0 | 7,903,277,472 | 100% | ||
toninux | 0 | 223,448,203 | 24.5% | ||
ruel.cedeno | 0 | 4,368,928,164 | 100% | ||
allsale | 0 | 39,015,412,310 | 6% | ||
lastozgur | 0 | 4,857,122,267 | 100% | ||
firatozbek | 0 | 4,481,555,494 | 100% | ||
finanzasid | 0 | 246,078,071 | 50% | ||
my-art-way | 0 | 16,018,919,781 | 100% | ||
make-a-whale | 0 | 40,705,408,477 | 6.6% | ||
bhim | 0 | 99,272,450 | 24.5% | ||
boontjie | 0 | 1,522,778,308 | 100% | ||
smafey | 0 | 276,756,855 | 24.5% | ||
isnochys | 0 | 7,063,265,890 | 13% | ||
rightscomet | 0 | 101,724,000 | 24.5% | ||
murattatar | 0 | 3,669,401,162 | 15% | ||
love-peace | 0 | 1,340,572,252 | 100% | ||
nudgent | 0 | 97,594,882 | 24.5% | ||
unforgettable | 0 | 3,099,741,272 | 100% | ||
elchin | 0 | 693,751,013 | 100% | ||
emrebeyler | 0 | 1,496,037,756,555 | 100% | ||
fkoryp | 0 | 153,076,148 | 100% | ||
mrmaracucho | 0 | 218,933,345 | 49% | ||
evilest-fiend | 0 | 1,712,881,305 | 50% | ||
tentalavera | 0 | 127,762,874 | 5% | ||
forkonti | 0 | 536,947,440 | 100% | ||
hellowhale | 0 | 153,971,431 | 100% | ||
gokos | 0 | 534,331,145 | 100% | ||
enjoyy | 0 | 181,200,606 | 24.5% | ||
berkerpeksag | 0 | 1,551,844,206 | 100% | ||
aydant | 0 | 9,263,345,331 | 100% | ||
intelligencer | 0 | 0 | 100% | ||
steemerturk | 0 | 46,440,827 | 25% | ||
vaire | 0 | 102,056,555 | 25% | ||
ataturk | 0 | 541,745,630 | 100% | ||
tinowhale | 0 | 2,364,909,787 | 49% | ||
ewq | 0 | 208,466,234 | 6% | ||
lukecreed | 0 | 155,151,156 | 24.5% | ||
hanwoo | 0 | 12,978,782,450 | 3% | ||
fromhell2sky | 0 | 7,975,998,501 | 24.5% | ||
sauronbey | 0 | 3,599,376,731 | 100% | ||
onursa | 0 | 534,907,170 | 100% | ||
googletr | 0 | 117,222,601 | 100% | ||
chorock | 0 | 33,898,718,403 | 8% | ||
canburaksimsek | 0 | 1,218,335,707 | 25% | ||
neokuduk | 0 | 1,372,210,806 | 100% | ||
muradovv | 0 | 659,137,513 | 5% | ||
emirfirlar | 0 | 560,486,694 | 24.5% | ||
literaturk | 0 | 443,886,041 | 100% | ||
holger80 | 0 | 92,875,496,838 | 50% | ||
uzerebru | 0 | 115,799,231 | 41% | ||
uzercanan | 0 | 218,593,847 | 45% | ||
pars11 | 0 | 10,627,835,669 | 100% | ||
ahmetmertugrul | 0 | 830,328,608 | 100% | ||
samedb | 0 | 546,593,348 | 100% | ||
giftbox | 0 | 193,200,488 | 100% | ||
faithvarron | 0 | 92,704,057 | 24.5% | ||
tipitip | 0 | 578,125,375 | 100% | ||
raoul.poenar | 0 | 971,544,009 | 100% | ||
akifane | 0 | 482,558,072 | 100% | ||
rasit | 0 | 444,135,262 | 100% | ||
eagle42 | 0 | 1,441,062,211 | 100% | ||
gjones15 | 0 | 420,449,733 | 24.5% | ||
backinblackdevil | 0 | 40,517,722,273 | 41% | ||
nagaclub | 0 | 91,892,820 | 24.5% | ||
maveraunnehr | 0 | 391,510,278 | 100% | ||
adibiqbal | 0 | 3,045,995,394 | 100% | ||
tolgahanuzun | 0 | 10,775,633,359 | 100% | ||
muratkbesiroglu | 0 | 289,182,412,278 | 100% | ||
sereze | 0 | 1,365,318,172 | 100% | ||
zcool | 0 | 187,715,586 | 10% | ||
carment | 0 | 97,462,823 | 24.5% | ||
victorcovrig | 0 | 3,076,278,185 | 50% | ||
qurator-tier-0 | 0 | 3,835,403,566 | 2.5% | ||
feronio | 0 | 1,305,623,165 | 100% | ||
hyroniz | 0 | 101,043,949 | 25% | ||
rechellomataro | 0 | 96,636,208 | 24.5% | ||
tyramisoux | 0 | 5,146,768,588 | 25% | ||
kryptorero | 0 | 101,013,137 | 24.5% | ||
bahagia9 | 0 | 95,223,849 | 24.5% | ||
gydronium | 0 | 126,036,192 | 29.4% | ||
blockchainstudio | 0 | 5,657,905,425 | 50% | ||
senseofhumor | 0 | 558,963,922 | 100% | ||
bilimkurgu | 0 | 56,049,395,762 | 100% | ||
hahajin | 0 | 0 | 100% | ||
rizzopablo | 0 | 131,228,552 | 25% | ||
parakazan | 0 | 206,663,599 | 100% | ||
emmywell | 0 | 98,279,258 | 24.5% | ||
codingart | 0 | 12,989,877,862 | 100% | ||
mozer | 0 | 2,342,089,656 | 50% | ||
pablorg94 | 0 | 433,171,266 | 100% | ||
sutter | 0 | 640,577,966 | 24.5% | ||
farukyegul | 0 | 64,907,562 | 12.5% | ||
trsteemian | 0 | 101,554,178 | 25% | ||
nsab | 0 | 414,972,259 | 100% | ||
beemtutorials | 0 | 391,706,572 | 100% | ||
gokhan.karaboga | 0 | 381,495,039 | 100% | ||
ali.yuce | 0 | 967,948,362 | 100% | ||
kabasakal | 0 | 3,655,064,907 | 100% | ||
ilovecoding | 0 | 799,168,682 | 10% | ||
alvinvoo | 0 | 797,650,402 | 100% | ||
daddywilliam | 0 | 2,057,131,953 | 24.5% | ||
omeryetim | 0 | 249,634,659 | 50% | ||
ozgurcinarli | 0 | 906,557,827 | 100% | ||
me-atif | 0 | 3,395,452,544 | 100% | ||
curbot | 0 | 1,943,027,098 | 5% | ||
kbskl | 0 | 486,704,376 | 100% |
great work and incredible my brother,i support your work,@emrebeyler
post_id | 64,463,328 |
---|---|
author | love-peace |
permlink | re-emrebeyler-docker-notes-3-20181018t075800000z |
category | docker |
json_metadata | {"tags":["docker"],"users":["emrebeyler"],"app":"steemit\/0.1"} |
created | 2018-10-18 07:58:03 |
last_update | 2018-10-18 07:58:03 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-10-25 07:58:03 |
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 | 68 |
author_reputation | 16,468,978,654,828 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
good
post_id | 64,463,539 |
---|---|
author | fkoryp |
permlink | re-emrebeyler-docker-notes-3-20181018t080325219z |
category | docker |
json_metadata | {"tags":["docker"],"app":"steemit\/0.1"} |
created | 2018-10-18 08:02:36 |
last_update | 2018-10-18 08:02:36 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-10-25 08:02:36 |
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 | 4 |
author_reputation | 18,431,282,494 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Please help this Blue Baby Patient, Laine Kharece by upvoting the link below. This is not a scam, we just need your support as part of steemit community. Thank you very much for reading and extending a little help. ![44065405_346364502805207_787515642797359104_n.png](https://cdn.steemitimages.com/DQmZjpN5epym1UA9Vkv2e3YeyWs43rjPhW6gt1w7AH5zzwa/44065405_346364502805207_787515642797359104_n.png) https://steemit.com/upfundme/@wews/steemit-help-a-blue-baby-patient
post_id | 64,466,484 |
---|---|
author | jejes |
permlink | re-emrebeyler-docker-notes-3-20181018t092650582z |
category | docker |
json_metadata | {"image":["https:\/\/cdn.steemitimages.com\/DQmZjpN5epym1UA9Vkv2e3YeyWs43rjPhW6gt1w7AH5zzwa\/44065405_346364502805207_787515642797359104_n.png"],"links":["https:\/\/steemit.com\/upfundme\/@wews\/steemit-help-a-blue-baby-patient"],"tags":["docker"],"app":"steemit\/0.1"} |
created | 2018-10-18 09:16:00 |
last_update | 2018-10-18 09:16:00 |
depth | 1 |
children | 0 |
net_rshares | 3,023,375,302 |
last_payout | 2018-10-25 09:16:00 |
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 | 464 |
author_reputation | 2,747,191,214,125 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
jejes | 0 | 3,023,375,302 | 100% |
Hi @emrebeyler, Thanks for your voting. Cause I know your id, I was a bit surpised :) Of course, I know you voted using a bot, but still it was quite interesting to me to see that too. I also made a bot @gomdory (gomdory means cute bear in Korean), which rescues :) a comment that doesn't have the minimum voting (i.e., $0.02) to be paid out. It's being tested in kr community by subscription based, and people love it. Now I'm in academia, but I also worked at Facebook before. So Steemit is quite interesting to me. Sometimes I wish I also post in English to communicate with people more internationally. I'll probably make other dApp on steemit, at that time I may also open it to any user. Thanks again! ps. I'm mainly using steem python library. Please somebody makes it up to date :( haha.
post_id | 64,504,727 |
---|---|
author | blockchainstudio |
permlink | re-emrebeyler-docker-notes-3-20181018t230312058z |
category | docker |
json_metadata | {"community":"busy","users":["emrebeyler","gomdory"],"links":["\/@emrebeyler","\/@gomdory"],"image":[],"app":"busy\/2.5.6","format":"markdown","tags":["docker"]} |
created | 2018-10-18 23:03:12 |
last_update | 2018-10-18 23:05:12 |
depth | 1 |
children | 6 |
net_rshares | 0 |
last_payout | 2018-10-25 23:03:12 |
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 | 798 |
author_reputation | 187,643,417,195,608 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Hi there, @gomdory looks cool. I guess there is also @dustsweeper doing the same thing. > ps. I'm mainly using steem python library. Please somebody makes it up to date :( haha. Did you try beem yet? It has a similar codebase with several enhancements and constant development updates. :)
post_id | 64,521,718 |
---|---|
author | emrebeyler |
permlink | re-blockchainstudio-re-emrebeyler-docker-notes-3-20181019t064301767z |
category | docker |
json_metadata | {"tags":["docker"],"users":["gomdory","dustsweeper"],"app":"steemit\/0.1"} |
created | 2018-10-19 06:43:03 |
last_update | 2018-10-19 06:43:03 |
depth | 2 |
children | 5 |
net_rshares | 0 |
last_payout | 2018-10-26 06:43:03 |
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 | 291 |
author_reputation | 319,480,565,467,431 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Sure I know @dustsweeper. @gomdory is free service. One interesting fact of kr community is people love commenting :) And I also believe some comments may be more valuable than main postings. Also comments are good for engagements. I've tried beem for some new features. I kind of prefered more official one but maybe now I should move on :) Thanks!
post_id | 64,527,137 |
---|---|
author | blockchainstudio |
permlink | re-emrebeyler-re-blockchainstudio-re-emrebeyler-docker-notes-3-20181019t091203049z |
category | docker |
json_metadata | {"links":["\/@dustsweeper","\/@gomdory"],"tags":["docker"],"community":"busy","format":"markdown","image":[],"app":"busy\/2.5.6","users":["dustsweeper.","gomdory"]} |
created | 2018-10-19 09:12:06 |
last_update | 2018-10-19 09:12:06 |
depth | 3 |
children | 4 |
net_rshares | 19,557,547,775 |
last_payout | 2018-10-26 09:12:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.016 SBD |
curator_payout_value | 0.004 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 350 |
author_reputation | 187,643,417,195,608 |
root_title | "Docker notes #3" |
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,516,409,608 | 1% | ||
gomdory | 0 | 4,041,138,167 | 3.37% |
Birthdaypost !BEER
post_id | 80,982,824 |
---|---|
author | isnochys |
permlink | re-docker-notes-3-20191018t060705z |
category | docker |
json_metadata | {"app":"beem\/0.20.23"} |
created | 2019-10-18 06:07:12 |
last_update | 2019-10-18 06:07:12 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2019-10-25 06:07:12 |
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 #3" |
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% |
<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,982,828 |
---|---|
author | beerlover |
permlink | re-docker-notes-3-20191018t060726z |
category | docker |
json_metadata | {"app":"beem\/0.21.1"} |
created | 2019-10-18 06:07:27 |
last_update | 2019-10-18 06:07:27 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2019-10-25 06:07: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 | 365 |
author_reputation | 16,011,958,080,429 |
root_title | "Docker notes #3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |