zoukankan      html  css  js  c++  java
  • 阿里云镜像上传打包

    每次从国外下代码非常慢,阿里云提供了镜像服务,镜像上传到案例与怒再拉到本地会快很多
    上传镜像到阿里云
    [root@nana php7.1]# docker images
    REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
    mysql5.7                                                 latest              1b12f2e9257b        10 days ago         448MB
    
    
    #登陆:
    docker login --username=阿里云账号 registry.cn-hangzhou.aliyuncs.com
    
    
    #打标
    docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/chenleilei/mysql:[镜像版本号]
    
    如:
    docker tag mysql registry.cn-hangzhou.aliyuncs.com/chenleilei/mysql5.7:latest
    
    
    #上传镜像到阿里云
    docker push registry.cn-hangzhou.aliyuncs.com/chenleilei/mysql5.7:latest
    
    
    
    #使用:
    docker  run -d 
    --name lnmp_mysql 
    --net network_lnmp 
    --mount src=mysql-vol,dst=/var/lib/mysql 
    -e MYSQL_ROOT_PASSWORD=123456 
    -e MYSQL_DATABASE=dede 
    registry.cn-hangzhou.aliyuncs.com/chenleilei/mysql5.7 
    --character-set-server=utf8
    
    #测试
    [root@nana php7.1]# mysql -h 172.18.0.2 -uroot -p123456
    Welcome to the MariaDB monitor.  Commands end with ; or g.
    Your MySQL connection id is 11
    Server version: 5.7.32 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    MySQL [(none)]> 
    
  • 相关阅读:
    哪些人需要学习Python开发?
    爬虫为什么用python
    python序列类型包括哪三种
    学习python的五个特点
    学python安装软件推荐
    怎么用python做网站?
    为什么大家都说,人生苦短我用python
    #专题练习# 搜索
    #专题练习# 网络流
    #专题练习# 强连通分量,缩点
  • 原文地址:https://www.cnblogs.com/superlinux/p/13916709.html
Copyright © 2011-2022 走看看