顯示具有 docker 標籤的文章。 顯示所有文章
顯示具有 docker 標籤的文章。 顯示所有文章

2022年12月28日 星期三

Docker embedded DNS

 1. 

在docker 1.10版本中,docker daemon實現了一個叫做embedded DNS server的東西,用來當你建立的容器滿足以下條件時:

  • 使用自定義網路;
  • 容器建立時候通過--name,--network-alias or --link提供了一個name;

https://philipzheng.gitbook.io/docker_practice/advanced_network/dns

https://www.796t.com/content/1549334006.html


2. Good

nameserver 127.0.0.11
options ndots:0

nslookup c2 127.0.0.11

https://zjuturtle.com/2017/11/22/docker-network/


3. office embeedded dns

https://docs.docker.com.zh.xy2401.com/v17.09/engine/userguide/networking/configure-dns/


4. Install dns

https://medium.com/nagoya-foundation/running-a-dns-server-in-docker-61cc2003e899

https://stackoverflow.com/questions/73227593/how-to-set-bind9-docker-container-as-dns-of-other-container

https://ithelp.ithome.com.tw/users/20067006/ironman/3369?page=3

2022年8月5日 星期五

Docker container crond and alpine

 ###########################

# test crond

# https://www.linuxfixes.com/2022/01/solved-docker-cron-scheduled-job-not.html

# https://www.onitroad.com/jc/linux/how-to-install-and-configure-log-roate-in-alpine-linux.html

# https://weinan.io/2019/04/06/cron.html

# https://unix.stackexchange.com/questions/375577/why-is-crond-failing-to-run-a-non-root-crontab-on-alpine-linux

#

#############################


apk list -I | grep 'log'

mkdir /etc/periodic/1min

echo "*/1     *       *       *       *       run-parts /etc/periodic/1min" >> /etc/crontabs/root


tee /etc/periodic/1min/foo <<EOF

#!/bin/sh

echo "Hello, world"

date >> /tmp/foo_crond

EOF

crond -f -l 8



# Your can run in out side to start cornd 


docker exec -d share_nginx crond -f -l 8

2016年5月4日 星期三

Docker reference


Simple :

1 slide Chinese docker-61214768