info
My Docker
environmental 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 Weblogic
mirror Dockerfile
and 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 Weblogic
based Java
, it is necessary to use JDK
the above document says use ../OracleJava/java-8 can build a JDK
mirror, where if you can direct orders docker pull store/oracle/serverjre:8
to 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 oracle
all the products offered Dockerfile
, no need full git clone
down, recommended downgit tool to java-8
and weblogic
directory down to.
Then this is the building behind the weblogic
time to know the things that need to Dockerfile
be found in the corresponding JDK
file name of the installation package, and then to the official website or anywhere else download package of the same name, and Dockerfile
put under the same directory.
Used here
server-jre-8u241-linux-x64.tar.gz
: Download
Then execute build.sh
build, generally not a problem.
Or Dockerfile
copy the contents out in Linux
a 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 checksum
or something, read it again to re-read the script content as well as over the top of the English README
only to find themselves required to download weblogic
the installation package, attach Download .
weblogic
Versions have three branches: developer
, , generic
, infrastructure
in ./dockerfiles/12.2.1.3/
the directory suffix from a file it can be seen that the corresponding Dockerfile
file, for example, generic
correspond Dockerfile.generic
.
No detailed study of the difference between them, simply looked generic
relatively full, with examples of what size 800M
, developer
much 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 Dockerfile
at 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 Complete
there 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 weblogic
mirroring 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/weblogic
after the discovery does not bring it up and running.
Has done some research README
and found some based on operational need has been oracle/weblogic:12.2.1.3-generic
re-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 generic
version, so it is necessary to change the directory at an example Dockerfile
file:
Build docker build -f Dockerfile -t 12213-weblogic-domain-in-volume .
commands: .
Before making vessel operation, need to modify the properties
directory of the two profiles, important information has been marked with a red circle should be noted that DOMAIN_HOST_VOLUME
the specified directory needs to exist in this machine, the directory is mapped to a local directory example the container, ADMIN_HOST
specify the container name.
Then modify run_admin_server.sh
can construct and run a named weblogic
vessel 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 weblogic
debug 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-domain
in run_admin_server.sh
the last line, the 8453
mapping out of the port.
Then, try to connect it nc -v your-ip 8453
, if prompted connected
it, if not then continue with the following steps.
The foregoing examples of the container to the local directory mapping, locally /root/domain
can be found under base_domain
the 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 debugFlag
to before debugFlag
after the assignment, plus one exoprt debugFlag="true"
.
Then restart the container docker restart weblogic
after a successful open debugging.