Docker使用:将镜像上传至阿里云

阿里云搭建docker镜像仓库 最近想把个人项目漏洞扫描平台info_scan部署到docker上,由于国内服务器无法访问docker,参考网上的资料,把如何通过阿里云搭建个人免费的docker镜像仓库,进行整理,只需要按照以下步骤操作即可,非常方便。 阅读详情
0x01 注册阿里云账户

阿里云官方网站链接:https://dev.aliyun.com

0x02 登陆账户
0x03 管理Docker Hub镜像站点:配置Docker加速器

链接:https://cr.console.aliyun.com/cn-hangzhou/mirrors

0x04 创建镜像仓库的命名空间

例如:trrinity

链接:https://cr.console.aliyun.com/cn-hangzhou/namespaces

0x05 创建镜像仓库

例如:image-test

链接:https://cr.console.aliyun.com/cn-hangzhou/repositories

0x06 操作指南

先查看下本地的镜像,选一个作为base image:

docker images
在这里插入图片描述
在某一个目录下面创建一个专门存放此demo的目录,也就是Dockerfile所在的context:

[root@docker ~]# mkdir docker_demo
[root@docker ~]# cd docker_demo/
[root@docker docker_demo]# touch Dockerfile
[root@docker docker_demo]# pwd
/root/docker_demo
[root@docker docker_demo]# ll
total 0
-rw-r--r--. 1 root root 0 Nov  1 14:34 Dockerfile

接下来就开始编写Dockerfile文件了(注意Dockerfile的D需要大写)

这里以编译nginx提供web服务来构建新的镜像

1、下载nginx源码包到docker_demo这个目录下:

[root@docker docker_demo]# ll
total 960
-rw-r--r--. 1 root root      0 Nov  1 04:34 Dockerfile
-rw-r--r--. 1 root root 981687 Oct 17 09:20 nginx-1.12.2.tar.gz

2、以下是编写好的Dockerfile v1版:
复制代码

# base image
FROM centos

# MAINTAINER
MAINTAINER xxxxxx@163.com

# put nginx-1.12.2.tar.gz into /usr/local/src and unpack nginx
ADD nginx-1.12.2.tar.gz /usr/local/src

# running required command
RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel
RUN yum install -y libxslt-devel -y gd gd-devel GeoIP GeoIP-devel pcre pcre-devel
RUN useradd -M -s /sbin/nologin nginx

# change dir to /usr/local/src/nginx-1.12.2
WORKDIR /usr/local/src/nginx-1.12.2

# execute command to compile nginx
RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module && make && make install

EXPOSE 80

3、查看docker_demo目录情况:

[root@docker docker_demo]# ll
total 964
-rw-r--r--. 1 root root   1112 Nov  1 04:58 Dockerfile
-rw-r--r--. 1 root root 981687 Oct 17 09:20 nginx-1.12.2.tar.gz

4、执行docker build进行构建:

docker build -t centos_nginx:v1 .

后面的.代表的是相对路径的当前目录,如果需要全路径则为/root/docker_demo(就是找到Dockerfile文件)

构建成功后,查看新构建的镜像:

在这里插入图片描述
5、然后使用构建的镜像启动一个container,开启nginx服务,将port映射到本机9999端口上:

[root@docker docker_demo]# docker run -d -p9999:80 centos_nginx:v1 /usr/local/nginx/sbin/nginx -g "daemon off;"
e4b6e4846dedc6f130e028701c84828a635f3b367c0d500ebd947de16b1be0b2

再次查看端口映射信息:
docker port
在这里插入图片描述
于是进行访问:
在这里插入图片描述
于是基于Dockerfile的一个简单实例构建完成,现在基于这个Dockerfile文件依次添加其他的指令进行构建

添加ENV环境变量指令:
# base image
FROM centos

# MAINTAINER
MAINTAINER xxx@163.com

# put nginx-1.12.2.tar.gz into /usr/local/src and unpack nginx
ADD nginx-1.12.2.tar.gz /usr/local/src

# running required command
RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel 
RUN yum install -y libxslt-devel -y gd gd-devel GeoIP GeoIP-devel pcre pcre-devel
RUN useradd -M -s /sbin/nologin nginx

# change dir to /usr/local/src/nginx-1.12.2
WORKDIR /usr/local/src/nginx-1.12.2

# execute command to compile nginx
RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio  --with-http_ssl_module  --with-http_realip_module    --with-http_addition_module    --with-http_xslt_module   --with-http_image_filter_module    --with-http_geoip_module  --with-http_sub_module  --with-http_dav_module --with-http_flv_module    --with-http_mp4_module --with-http_gunzip_module  --with-http_gzip_static_module  --with-http_auth_request_module  --with-http_random_index_module   --with-http_secure_link_module   --with-http_degradation_module   --with-http_stub_status_module && make && make install

ENV PATH /usr/local/nginx/sbin:$PATH

EXPOSE 80

由于在构建的过程中docker会采用缓存的机制,上面的构建过程中包含很多using cache,所以这次构建非常快,如果需要重新构建,不想使用cache需要添加–no-cache

–no-cache Do not use cache when building the image
使用v2版本的镜像启动一个container:
docker run -d -p81:80 centos_nginx:v2 nginx -g "daemon off;"
在这里插入图片描述上述启动容器的过程中使用的命令docker run -d -p81:80 centos_nginx:v2 nginx -g "daemon off;"为什么这里使用的nginx而不是

/usr/local/nginx/sbin/nginx,因为在Dockerfile文化中执行了PATH=/usr/local/nginx/sbin:$PATH,添加到了环境变量

添加指令CMD:
# base image
FROM centos

# MAINTAINER
MAINTAINER xxxxxx@163.com

# put nginx-1.12.2.tar.gz into /usr/local/src and unpack nginx
ADD nginx-1.12.2.tar.gz /usr/local/src

# running required command
RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel 
RUN yum install -y libxslt-devel -y gd gd-devel GeoIP GeoIP-devel pcre pcre-devel
RUN useradd -M -s /sbin/nologin nginx

# change dir to /usr/local/src/nginx-1.12.2
WORKDIR /usr/local/src/nginx-1.12.2

# execute command to compile nginx
RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio  --with-http_ssl_module  --with-http_realip_module    --with-http_addition_module    --with-http_xslt_module   --with-http_image_filter_module    --with-http_geoip_module  --with-http_sub_module  --with-http_dav_module --with-http_flv_module    --with-http_mp4_module --with-http_gunzip_module  --with-http_gzip_static_module  --with-http_auth_request_module  --with-http_random_index_module   --with-http_secure_link_module   --with-http_degradation_module   --with-http_stub_status_module && make && make install

ENV PATH /usr/local/nginx/sbin:$PATH

EXPOSE 80

CMD /bin/sh -c 'nginx -g "daemon off;"'

然后进行构建:

[root@docker docker_demo]# docker build -t centos_nginx:v3 .

然后基于v3版本的镜像启动一个container:
[root@docker docker_demo]# docker run -d -p82:80 centos_nginx:v3

新增加的CMD /bin/sh -c 'nginx -g “daemon off;”'表示

当启动一个container时默认运行的命令,如果在启动container时赋予了command的话,那么定义的CMD中的命令将不会被执行,而会去执行command的命令

添加entrypoint指令:
# base image
FROM centos

# MAINTAINER
MAINTAINER xxxxxx@163.com

# put nginx-1.12.2.tar.gz into /usr/local/src and unpack nginx
ADD nginx-1.12.2.tar.gz /usr/local/src

# running required command
RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel 
RUN yum install -y libxslt-devel -y gd gd-devel GeoIP GeoIP-devel pcre pcre-devel
RUN useradd -M -s /sbin/nologin nginx

# change dir to /usr/local/src/nginx-1.12.2
WORKDIR /usr/local/src/nginx-1.12.2

# execute command to compile nginx
RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio  --with-http_ssl_module  --with-http_realip_module    --with-http_addition_module    --with-http_xslt_module   --with-http_image_filter_module    --with-http_geoip_module  --with-http_sub_module  --with-http_dav_module --with-http_flv_module    --with-http_mp4_module --with-http_gunzip_module  --with-http_gzip_static_module  --with-http_auth_request_module  --with-http_random_index_module   --with-http_secure_link_module   --with-http_degradation_module   --with-http_stub_status_module && make && make install

ENV PATH /usr/local/nginx/sbin:$PATH

EXPOSE 80

ENTRYPOINT ["nginx"]

CMD ["-g","daemon off;"]

当ENTRYPOINT和CMD连用时,CMD的命令是ENTRYPOINT命令的参数,两者连用相当于nginx -g “daemon off;”

而当一起连用的时候命令格式最好一致(这里选择的都是json格式的是成功的,如果都是sh模式可以试一下)

开始进行构建v4版本:

[root@docker docker_demo]# docker build -t centos_nginx:v4 .

查看新建的镜像:

[root@docker docker_demo]# docker images
REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
centos_nginx           v4                  6c5128aaff05        4 minutes ago       464MB

为v4版本的镜像启动一个container:

# shannon @ localhost [21:05:48] docker run -d -p4444:80 centos_nginx:v4 
# shannon @ localhost [21:05:48] docker ps -l
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                  NAMES
887e2aab1e6e        centos_nginx:v5     "nginx -g 'daemon off"   2 seconds ago       Up 2 seconds        0.0.0.0:4444->80/tcp   frosty_leakey
添加VOLUME指令:
# base image
FROM centos

# MAINTAINER
MAINTAINER xxxxxx@163.com

# put nginx-1.12.2.tar.gz into /usr/local/src and unpack nginx
ADD nginx-1.12.2.tar.gz /usr/local/src

# running required command
RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel 
RUN yum install -y libxslt-devel -y gd gd-devel GeoIP GeoIP-devel pcre pcre-devel
RUN useradd -M -s /sbin/nologin nginx

# mount a dir to container
VOLUME ["/data"]

# change dir to /usr/local/src/nginx-1.12.2
WORKDIR /usr/local/src/nginx-1.12.2

# execute command to compile nginx
RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio  --with-http_ssl_module  --with-http_realip_module    --with-http_addition_module    --with-http_xslt_module   --with-http_image_filter_module    --with-http_geoip_module  --with-http_sub_module  --with-http_dav_module --with-http_flv_module    --with-http_mp4_module --with-http_gunzip_module  --with-http_gzip_static_module  --with-http_auth_request_module  --with-http_random_index_module   --with-http_secure_link_module   --with-http_degradation_module   --with-http_stub_status_module && make && make install

# setup PATH
ENV PATH /usr/local/nginx/sbin:$PATH

# EXPOSE
EXPOSE 80

# the command of entrypoint
ENTRYPOINT ["nginx"]

CMD ["-g"]

开始进行构建:
[root@docker docker_demo]# docker build -t centos_nginx:v5 .
查看v5版本的镜像:

[root@docker ~]# docker images
REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
centos_nginx           v5                  959fdf4d4288        35 seconds ago      464MB

利用该镜像启动一个container:

[root@docker ~]# docker run -d -p 86:80 --name=nginx6 centos_nginx:v5 -g "daemon off;"
6c15a9e93fb1421bdb7eddaabe439996e97415e85a003f80c1d8b4b2c5ee3ffa

查看启动的容器状态:

[root@docker ~]# docker ps -l
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                NAMES
6c15a9e93fb1        centos_nginx:v5     "nginx -g 'daemon ..."   4 seconds ago       Up 4 seconds        0.0.0.0:86->80/tcp   nginx6

利用docker exec进入到container中,查看是否存在卷/data:
在这里插入图片描述
docker inspect 查看通过该dockerfile创建的镜像生成的容器
在这里插入图片描述
在这里插入图片描述这个/data挂载的目录对应本机source的这个目录:

现在在本机/data上的这个目录创建一个文件:

[root@docker _data]# touch wadeson.sh
[root@docker _data]# ll
total 0
-rw-r--r--. 1 root root 0 Nov  1 21:45 wadeson.sh

然后切换到container中查看是否存在这个文件:

[root@6c15a9e93fb1 /]# ll /data/
total 0
-rw-r--r--. 1 root root 0 Nov  2 01:45 wadeson.sh
war包上传
shannon @ localhost in ~/yann/docker-tomcat on git:master x [7:15:30]
docker pull tomcat 

shannon @ localhost in ~/yann/docker-tomcat on git:master x [7:15:30]
vi Dockerfile
FROM tomcat
MAINTAINER "dora  <522268397@qq.com>"
ADD Dora.war /usr/local/tomcat/webapps/
CMD ["catalina.sh", "run"]
# shannon @ localhost in ~/yann/docker-tomcat on git:master x [7:15:30]
$ docker build -t tomcat:0.0.1 .
0x06 阿里云操作指南

在这里插入图片描述
1)远程登录阿里云docker registry:
$ sudo docker login --username=trrinity registry.cn-hangzhou.aliyuncs.com
注:登录registry的用户名是您的阿里云账号全名,密码是开通namespace时设置的密码。

2)从registry中拉取镜像:
$ sudo docker pull registry.cn-hangzhou.aliyuncs.com/msj/image-test:[镜像版本号]
3)将镜像推送到registry:
$ sudo docker login --username=mashujie registry.cn-hangzhou.aliyuncs.com $ sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/msj/image-test:[镜像版本号] $ sudo docker push registry.cn-hangzhou.aliyuncs.com/msj/image-test:[镜像版本号]
其中[ImageId],[镜像版本号]请你根据自己的镜像信息进行填写。

0x07 终端执行脚本代码

#登陆命令
$ docker login --username=mashujieregistry.cn-hangzhou.aliyuncs.com
#查看主机镜像
$ docker images
#复制镜像ID并设置tag (或者tag repository:tag)
$ docker tag 96eecaf1019a registry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01 $ docker tag image01:01registry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01
#上传镜像到阿里云镜像仓库
$ docker push registry.cn-hangzhou.aliyuncs.com/msj/image-test:helloimage01

Docker的安装 与 环境配置 及 阿里云镜像仓库配置、常用命令等 新一代虚拟化技术Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从Apache2.0协议开源。Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口(类似 iPhone 的 app),更重要的是容器性能开销极低。Docker 从 17.03 版本之后分为 CE(Community Edition: 社区版) 和 EE(Enterprise Edition: 企业版 阅读详情

相关推荐

【云原生】Docker入门 -- 阿里云服务器Linux环境下安装Docker

最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!

m0_61067876的博客 3721

如何高效利用阿里云Docker镜像仓库管理您的容器镜像

Docker镜像仓库是存储、管理和分发Docker镜像的集中化存储库,它允许开发人员和运维人员在构建、发布和部署应用程序时轻松地共享和访问Docker镜像。Docker私有仓库通过提供安全性、网络性能优化、灵活的镜像管理和版本控制,以及用户友好的体验,成为企业和组织内部Docker镜像管理的理想选择。“笑对人生,智慧同行!博客新文出炉,微信订阅号更新更实时,等你笑纳~”

拥有必珍惜 1万+

【Docker】镜像的构建与上传下载阿里云

我们在使用Docker的时候,用着别人的镜像总是差点意思又或者说会有环境差异导致的潜在问题,为了避免这些问题我们可以自行构建镜像,并且将镜像上传阿里云镜像仓库方便拉取

万维网连五洲,二进制写尽天下事,喜欢结识新伙伴寻找志同道合的朋友,欢迎一起探讨学习 7226

阿里云服务器上配置Docker 以及常用命令讲解

Docker

Xkccsdn147的博客 6032

Docker之镜像上传

《一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码》,点击传送门,即可获取! RUN apk --no-cache add ca-certificates wget \&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \&& apk add glibc-2.29-r0.apk glibc-bin-2.29-r0.apk glibc-i18n-2.

2401_84152126的博客 1631

Docker创建个人阿里云镜像,上传/拉取阿里云镜像

创建属于个人的阿里云镜像仓库

全糖少冰我吃不了苦 4847

docker+jenkins+k8s集群搭建系列五、docker登录阿里云容器镜像服务,上传镜像

一、docker登录阿里云镜像仓库 阿里云镜像仓库访问方式有以下几种: 我们使用镜像仓库就是为了往镜像仓库上传镜像,镜像有大有小,为了上传方便,我使用内网的方式登录 docker login --username=86170****@qq.com registry-vpc.cn-beijing.aliyuncs.com 回车后会提示输入密码,这个地方输入阿里云镜像仓库的登录密码就行。 二、往阿里云镜像仓库上传项目的镜像 1、给镜像打tag 先查看一下系统中的镜像 这是我们系统中的镜像,直接往阿里云镜

sun_luming的博客 1163

Docker之自定义镜像上传至阿里云

Alpine Linux是一个轻量级的Linux发行版,专注于安全、简单和高效。它采用了一个小巧的内核和基于musl libc的C库,使得它具有出色的性能和资源利用率。Alpine Linux的主要特点包括:小巧轻量:Alpine Linux的安装包非常小,只有几兆字节,这使得它在资源受限的环境中运行非常高效。安全可靠:Alpine Linux采用了一系列安全措施,包括堆栈保护、内核级别的防护和支持安全沙盒等,以确保系统的安全性和可靠性。

空空bye. 9637

Docker镜像commit操作案例

● docker commit提交容器副本使之成为一个新的镜像 比如 在我们从官网下载的Ubuntu镜像是没有vim命令的: 格式: docker commit -m="提交的描述信息" -a="作者" 容器ID 要创建的目标镜像名:[标签名] 操作实例:(commit一个带有vim命令的新镜像) ① 在终端输入 apt-get update ②在终端输入 apt-get -y install vim ...

Hud的博客 794

从‘包饺子’到‘包络线’:一个生活化比喻讲透长期与短期成本决策

本文通过饺子馆经营的生活化比喻,深入浅出地解析了长期与短期成本决策的核心逻辑。从调整人力(可变成本)到扩建厨房(固定成本),揭示了包络线理论在商业决策中的实际应用,帮助企业主在规模经济与成本控制间找到平衡点。

weixin_32006655的博客 342

智慧城市项目实战:如何将你的地理数据从城市坐标系(如上海2000)转换到国家CGCS2000?

本文详细介绍了智慧城市项目中地理数据坐标系转换的全流程解决方案,重点讲解如何将城市坐标系(如上海2000)转换到国家CGCS2000。通过七参数布尔莎模型、ArcGIS Pro、QGIS开源方案及Python编程实现,帮助实施团队解决坐标系不统一的技术难题,确保空间分析精度。

weixin_28725949的博客 307

阿里云容器镜像服务ACK上传镜像报错:denied: requested access to the resource is denied

阿里云容器镜像服务ACK上传镜像报错:denied: requested access to the resource is denied,unauthorized: authentication required

Mr.Darwin的博客 1540

手把手教你用TI MOSFET搭建0-100mA恒流源电路(附避坑指南)

本文详细介绍了如何使用TI MOSFET SI1204D搭建0-100mA恒流源电路,包括基础原理、电路设计、PCB布局和热管理技巧。通过分步指导和避坑指南,帮助工程师实现高精度、低成本的电流控制方案,适用于LED驱动、传感器激励等多种应用场景。

weixin_29310631的博客 485

运维篇Docker之灵魂拷问 2-1

关注微信公众号:Java书友会 获取更多好文呦奥利给 上篇博文中,我们已经对Docker有了基本的了解,这次我们针对Docker的两个核心组件进行灵魂拷问,由于篇幅的关系,我们本节主要拷问Images,至于Containers,留至下半节进行拷问。 Images 在上节的最后,我们提到了Docker设计猜想,这次我们以tomcat为例,来一步一步证明我们的猜想 从上节内容我们已经知道,在执行...

txjs 529

Dify+MCP Server打造禅道AI智能助手

Dify AI与MCP Server结合打造的禅道AI智能助手,实现了项目管理智能化升级。该方案通过大语言模型和自动化工作流,提供四大核心功能:1)自动化报表生成,支持多维度数据统计与可视化;2)禅道系统管理操作,简化产品/项目/任务管理流程;3)基于知识库的智能问答系统;4)数据库灵活查询与可视化输出。系统采用分层架构,通过MCP协议实现AI与数据源解耦,解决了传统禅道在数据孤岛、工具碎片化等问题。实际应用验证了其在用户管理、任务创建、Bug处理等场景的高效性,显著提升了项目管理效率。

oNew_Lifeo的博客 1709

LeRobot 入门教程(七)数据集

LeRobot Dataset v3.0 是机器人学习数据的标准化格式,支持多模态时间序列数据和视频的统一访问。该版本通过基于文件的存储(Parquet/MP4)、关联元数据和Hub原生流式处理等新特性,显著提升了性能并降低了存储开销。文档详细介绍了格式设计、安装使用、数据记录与加载方法,以及从v2.1迁移到v3.0的步骤,特别针对大型数据集(如DROID 1.0.1)的处理提供了SLURM集群移植方案。v3.0通过优化文件组织和元数据管理,实现了更快的加载速度、更高的内存效率和更好的可扩展性。

2506_90492529的博客 2055

在低版本CentOS上使用rpm包部署docker,解决依赖过低问题

docker离线rpm安装遇到各种依赖过低、Linux操作系统CentOS版本过低需要更新很多依赖,在低版本CentOS上使用rpm包部署docker,解决依赖过低问题

qq_43640212的博客 788

YOLOv11 改进 - 特征融合 | 小目标检测救星:DySample动态上采样减少特征丢失

本文介绍了超轻量且高效的动态上采样器DySample与YOLOv11的结合,以解决传统上采样器工作负载大、应用场景受限的问题。DySample从点采样角度构建上采样,绕过动态卷积,使用PyTorch标准内置函数实现,无需定制CUDA包,能大幅减少参数、FLOPs等资源消耗。我们将DySample代码集成进YOLOv11。实验脚本显示,结合DySample的YOLOv11在多个密集预测任务中或表现出色。

魔改工程师的博客 1418

docker删除none镜像_Docker的安装和使用

0、Docker1.What is Docker?Docker 是一个开源的应用容器引擎。Docker可以将我们的想要的环境构建(打包)成一个镜像,然后我们可以推送(发布)到网上去。想要用这个环 境的时候,在网上拉取一份就好了。2.Why we need Docker?2.1 环境(切换/配置)麻烦:使用Docker可以将环境封装好,让别人直接用Dockerfile创建出一个一模一样的环境。2.2...

weixin_39853590的博客 163

SAP_MM模块-服务类采购详细讲解案例

SAP_MM模块服务类采购订单配置及业务测试案例详解,包括前台业务操作、后台配置以及使用过程中的问题处理

风沙的博客 5127

ACS运动控制器编程语言

ACS运动控制器采用SPiiPlusLanguage(SPL)作为核心编程语言,该语言基于C语法设计,内置丰富的运动控制指令,支持点位运动、插补等复杂控制。控制器提供专用开发工具SPiiPlusManager和ACSStudio,支持图形化编程与调试。同时兼容TCP/IP、EtherCAT等多种扩展接口,便于与上位机或PLC集成。使用时需注意实时性优先级、轴参数匹配等关键事项。官方文档和示例程序为开发者提供了完善的学习资源。

StevenChen的博客 624

Docker镜像的制作、上传、拉取和部署(利用阿里云)

由于学习过程中发现push镜像的时候一直超时,所以直接把阿里云的Docker仓库申请一个(管理中心–>创建镜像仓库–>我的是华东2绑定github账户即可),搞定!以后push就用这个仓库,pull的时候使用加速器,注意切换根据使用场景进行切换,dockerhub丢弃……记录了一下操作流程: 1.创建命名空间hhu(以当前学校为单位,只能小写,每个账号只能创建5个),创建菜鸟Docker镜像仓库

jacksonary的博客 7万+

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Docker上传镜像至阿里云私有镜像仓库

一、阿里云创建私有镜像仓库 1、首先是登录阿里云官网,这个就不用多说了 2、点击右上角的控制台然后找到容器镜像服务 3、选择容器镜像服务以后就会跳转到实例列表,这个时候注意记得把上面的归属地切换成你购买服务器地区,这里有的时候会有bug,默认不是你购买的服务器的所属区域。然后再点击个人实例进入实例详情页。 4、进入个人实例详情以后先进入命名空间,创建一个空间,然后再点击镜像仓库创建一个镜像仓库以便后期推送镜像到仓库里。镜像仓库是必须放在命名空间下的,目前阿里云运行个人创建3个命名空间。最后就是点击访问

xiaoye的博客 4491

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

docker 打包 镜像,并上传到阿里云镜像仓库

文章目录一、docker 打包镜像1、将现有的容器进行打包2、使用Dockerfile进行打包镜像二、镜像文件上传到 阿里云镜像 一、docker 打包镜像 1、将现有的容器进行打包 查看现有容器 docker ps #或 docker ps -a 将容器打包成镜像 docker commit -a "作者" -m "简要说明" 容器ID 想要打包成的镜像名称:版本号 实例:将容器a404c6c174a2 保存为新的镜像,并添加提交人信息和说明信息。 docker commit -a "ru

会飞的小蜗 1万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Docker之镜像上传(手把手教你在Docker中进行镜像上传)

前言 在我们做项目过程中,需要很多的配置文件,这时我们学了Docker镜像上传之后,就可以直接从阿里云服务器上直接拉取依赖下来进行操作 一、镜像上传 1、将jre资源包复制到自己所在的文件中 2、更改Dockerfile文件内容,实现alpine上传 3、使上传文件进行瘦身,使得上传文件大小更小 3、创建github账号,建立一个仓库 在github网站中切换成中文形式,自己可以去创建一个github仓库 4、进入到阿里云服务官网,进行注册镜像仓库 ...

m0_53151031的博客 2万+

Docker 进阶 发布自己的Docker镜像 将镜像上传到阿里云和Docker Hub

上传自己制作的docker镜像的方法,将docker镜像上传到Docker Hub,阿里云的两种方法,以及上传镜像时可能遇见的问题和解决办法,每一步的详解和上传镜像时的规范。

运维派大星 3188
上一篇: kafka介绍以及Mac下安装使用Kafka
下一篇: Docker生成jenkins容器,支持python项目持续集成
Shannonnnn
博客等级 码龄10年 241粉丝 69原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值