Step WebLogic constructed using manual mirror Docker

info

My Dockerenvironmental information as follows:

[root@localhost ~]# docker info -f  "
OSType:
    {{.OperatingSystem}} {{.Architecture}} {{.KernelVersion}}

DockerVersion:
    {{.ServerVersion}}
    
Mirrors:   {{range .RegistryConfig.Mirrors}}
    {{.}}{{end}}"
OSType:
    CentOS Linux 7 (Core) x86_64 3.10.0-957.21.3.el7.x86_64
DockerVersion:
    19.03.8
Mirrors: 
    http://ovfftd6p.mirror.aliyuncs.com/
    http://registry.docker-cn.com/
    http://docker.mirrors.ustc.edu.cn/
    http://hub-mirror.c.163.com/

Docker installation

# 依赖
yum install -y yum-utils device-mapper-persistent-data  lvm2

# 添加仓库
yum-config-manager  --add-repo   https: //download.docker.com/linux/centos/docker-ce.repo 594  yum-config-manager --enable docker-ce-nightly
yum-config-manager --enable docker-ce-test
yum-config-manager --disable docker-ce-nightly

# 安装
yum -y install docker-ce docker-ce-cli containerd.io

Looking Weblogic mirror finished in the dockerhub

The next ride just to debug environment, thought to engage in too much trouble, it is best to have finished in dockerhub find more than two downloads, the first one is official:

But unfortunately, the image is too big, also a no download is successful, are stuck half way to not move, can only produce their own up.

Official has constructed Weblogicmirror Dockerfileand some instructions: Click to view .

Here posted at the official document:

in English, is also not very detailed write it, here's a look through the manual to build this document.

Construction mirror JAVA-8

Because Weblogicbased Java, it is necessary to use JDKthe above document says use ../OracleJava/java-8 can build a JDKmirror, where if you can direct orders docker pull store/oracle/serverjre:8to do a good job of mirroring off would not be too much trouble.

If, like me, do not download the download finished, only manually constructed. oracle / docker-images in this warehouse contains oracleall the products offered Dockerfile, no need full git clonedown, recommended downgit tool to java-8and weblogicdirectory down to.

Then this is the building behind the weblogictime to know the things that need to Dockerfilebe found in the corresponding JDKfile name of the installation package, and then to the official website or anywhere else download package of the same name, and Dockerfileput under the same directory.

Used here server-jre-8u241-linux-x64.tar.gz: Download

Then execute build.shbuild, generally not a problem.

Or Dockerfilecopy the contents out in Linuxa new file of the same name, the copy into it, and then execute the current directory docker build -t oracle/serverjre:8 .can build it.

Weblogic download binary packages

Foolishly tried for a long time buildDockerImage.sh, the result has been an error checksumor something, read it again to re-read the script content as well as over the top of the English READMEonly to find themselves required to download weblogicthe installation package, attach Download .

weblogicVersions have three branches: developer, , generic, infrastructurein ./dockerfiles/12.2.1.3/the directory suffix from a file it can be seen that the corresponding Dockerfilefile, for example, genericcorrespond Dockerfile.generic.

No detailed study of the difference between them, simply looked genericrelatively full, with examples of what size 800M, developermuch smaller, only 231M, tried to run full speed, put the two are downloaded to build it again.

The downloaded files do not need to decompress, and put the corresponding version Dockerfileat the same level file directory.

Construction of Weblogic12 Mirror

My goal version 12.2.1.3 generic, so use sh buildDockerImage.sh -v 12.2.1.3 -b.
The script itself is no problem, but the Percent Completethere has been an error, always to 40%process and hung up, here tried many times to find 40%time to computer fans whirring, looked at the memory footprint probably know why, my virtual machine allocate memory only 512M, try to expand 2G, build weblogicmirroring successfully completed.

Run with

Not previously come into contact with the middleware, so he did not understand how to use. Directly docker run -d oracle/weblogicafter the discovery does not bring it up and running.

Has done some research READMEand found some based on operational need has been oracle/weblogic:12.2.1.3-genericre-construct an instance of a mirror, some official sample, I chose the 12213-Domain , others have tried, failed to successfully constructed.

Because I want to use this genericversion, so it is necessary to change the directory at an example Dockerfilefile:

Build docker build -f Dockerfile -t 12213-weblogic-domain-in-volume .commands: .

Before making vessel operation, need to modify the propertiesdirectory of the two profiles, important information has been marked with a red circle should be noted that DOMAIN_HOST_VOLUMEthe specified directory needs to exist in this machine, the directory is mapped to a local directory example the container, ADMIN_HOSTspecify the container name.

Then modify run_admin_server.shcan construct and run a named weblogicvessel at this time if there is no firewall restrictions, visit http: // your-ip: 7001 / console should be OK.

Open the Debug Port

The above script does not start by default weblogicdebug port 8453, in order after the test, try to open here.
First, delete the container you created earlier docker stop weblogic && docker container rm weblogic.
Then modify the examples directory 12213-domainin run_admin_server.shthe last line, the 8453mapping out of the port.

Then, try to connect it nc -v your-ip 8453, if prompted connectedit, if not then continue with the following steps.

The foregoing examples of the container to the local directory mapping, locally /root/domaincan be found under base_domainthe directory, the directory structure is as follows:

Modify bin/setDomainEnv.sh, find the most suitable place, how to determine the most appropriate word is first used debugFlagto before debugFlagafter the assignment, plus one exoprt debugFlag="true".

Then restart the container docker restart weblogicafter a successful open debugging.

Related Links

Guess you like

Origin www.cnblogs.com/lxmwb/p/12578952.html