For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
for i in $( docker images --format "{{.Repository}}:{{.Tag}}" ) | |
do | |
docker pull $i | |
done | |
# or | |
# docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull | |
docker image prune -f |
# 数据来源 http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201703/t20170310_1471429.html | |
# 截止 2016 年 7 月 31 日 | |
# 4 个直辖市下面的市辖区手动处理, 改为对应的名字,如 北京市-市辖区 改为 北京市-北京 | |
# 其他市辖区, 直接去掉, 不入库 | |
# 还有 4 个省直辖县级行政区划也手动处理, 去掉层级关系 | |
class CreateChinaCities < ActiveRecord::Migration[5.0] | |
def change | |
create_table :china_cities do |t| | |
t.integer :code, index: true |