首页 文章 精选 留言 我的

精选列表

搜索[镜像无法拉取],共10000篇文章
优秀的个人博客,低调大师

Windows Docker镜像构建之Oracle客户端

新版的Windows 2016已经支持原生Docker,现在也将部分服务往Docker上迁移进行测试。 环境中有使用.net 3.5和.net 4.0以及有使用Oracle客户端,因此Web容器就需要安装Oracle客户端 Dockerfile 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 FROMmicrosoft /iis #install.NET3.5 ADDsxs /sxs RUNDism /online /enable-feature /featurename :NetFX3 /All /Source :C:\sxs /LimitAccess &&del /S /Q C:\sxs #installASP.NET4.5 RUNdism /online /enable-feature /all /featurename :NetFx4 /featurename :IIS-ApplicationInit /featurename :IIS-ASPNET45 /featurename :IIS-ASPNET /NoRestart #enablewindowseventlog RUNpowershell.exe- command Set-ItemPropertyHKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-ApplicationStart1 #setIISlogfields RUN /windows/system32/inetsrv/appcmd .exe set config /section :system.applicationHost /sites /siteDefaults .logFile.logExtFileFlags: "Date,Time,ClientIP,UserName,SiteName,ServerIP,Method,UriStem,UriQuery,HttpStatus,Win32Status,TimeTaken,ServerPort,UserAgent,Referer,HttpSubStatus" /commit :apphost #installOracleClient ADDwin64_11gR2_client.zip /win64_11gR2_client .zip ADDunzip.exe /unzip .exe RUN /unzip .exe /win64_11gR2_client .zip&&del /S /Q win64_11gR2_client.zip ADDclient.rsp /client/client .rsp RUN /client/setup .exe-silent-force-noconsole-ignoreSysPrereqs-ignorePrereq-waitforcompletion-responseFileC:\client\client.rsp&&del /S /Q client #RUNcaclsc:\app/T/E/C/Gusers:r #deploywebapp #COPYpublish/inetpub/wwwroot/html #setentrypointscript ADDSetHostsAndStartMonitoring.cmd\SetHostsAndStartMonitoring.cmd ENTRYPOINT[ "C:\\SetHostsAndStartMonitoring.cmd" ] #declarevolumes VOLUME[ "c:/inetpub/logs/LogFiles" , "C:/inetpub/wwwroot/html" ] Dockerfile涉及的文件内容有 sxs #在Windows Server 2016 安装包的\sources\sxs\目录 unzip.exe #Oracle Client客户端安装包的client\install目录下 win64_11gR2_client.zip #自行到官方下载 client.rsp #Oracle客户端安装响应文件 SetHostsAndStartMonitoring.cmd client.rsp 1 2 3 4 5 6 7 8 9 10 11 12 13 oracle. install .responseFileVersion=http: //www .oracle.com /2007/install/rspfmt_clientinstall_response_schema_v11_2_0 ORACLE_HOSTNAME= UNIX_GROUP_NAME= INVENTORY_LOCATION=C:\ProgramFiles\Oracle\Inventory SELECTED_LANGUAGES=zh_CN,en ORACLE_HOME=C:\app\Administrator\product\11.2.0\client_1 ORACLE_BASE=C:\app\Administrator oracle. install .client.installType=Runtime oracle. install .client.customComponents= "oracle.precomp:11.2.0.1.0" , "oracle.ons:11.2.0.0.0" , "oracle.oraolap.mgmt:11.2.0.1.0" , "oracle.rdbms.scheduler:11.2.0.1.0" oracle. install .client.customComponents= oracle. install .client.oramtsPortNumber=49152 oracle. install .client.schedulerAgentHostName= oracle. install .client.schedulerAgentPortNumber= SetHostsAndStartMonitoring.cmd 1 2 3 4 5 6 echo %HOST%>> /Windows/System32/drivers/etc/hosts /windows/system32/inetsrv/appcmd .exedeletesite "DefaultWebSite/" /windows/system32/inetsrv/appcmd .exeaddapppool /name : "%site_name%" /managedRuntimeVersion : "v%site_version%.0" /managedPipelineMode :Classic-queueLength:65535 /windows/system32/inetsrv/appcmd .exeaddsite /name : "%site_name%" /physicalPath : "c:\inetpub\wwwroot\html" -serverAutoStart: true /bindings :http: // *:80 /windows/system32/inetsrv/appcmd .exe set site /site .name: "%site_name%" /[path= '/' ].applicationPool: "%site_name%" c:\ServiceMonitor.exew3svc 文件中涉及到三个环境变量 HOST #因为windows Docker无法通过--add-host指host这里通过这种方法指host site_name #站点域名 site_version #.net版本 Docker启动示例: 1 dockerrun-d-p80-esite_name=fengwan.blog.51cto.com-esite_version=4-ehost= "192.168.2.2db.51cto.com" - v c: /webroot/fengwan :c: /inetpub/wwwroot/html - v c: /logs :c: /inetpub/logs/logFiles image_name 本文转自 rong341233 51CTO博客,原文链接:http://blog.51cto.com/fengwan/1943280

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册