• 阿里云镜像上传打包


    每次从国外下代码非常慢,阿里云提供了镜像服务,镜像上传到案例与怒再拉到本地会快很多
    上传镜像到阿里云
    [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)]> 
    
  • 相关阅读:
    【洛谷2904/BZOJ1617】[USACO08MAR]跨河River Crossing(动态规划)
    【洛谷4158/BZOJ1296】[SCOI2009]粉刷匠(动态规划)
    stat()函数--------------获取文件信息
    mysql数据库优化
    sql注入原理以及实例
    配置Tomcat 7 Gzip
    NDK环境搭建方法2
    IIS7.0上传在大小限制
    背景图片的运动
    时间戳的转换
  • 原文地址:https://www.cnblogs.com/superlinux/p/13916709.html
Copyright © 2020-2023  润新知