One for building and pushingDockerof the MirrorMavenPlug - ins.Use the Maven plugin to build the Docker image, Docker mirror push it to the DockerHub top, or the private warehouse, the previous article is handwritten Dockerfile , this article with the open source plug-in docker-maven-plugin operationThe following actio
Author: bai, neusoft Internet operating platform technical director, graduated from Harbin University of Technology, go language expert, Gopherchina lecturer, technical trainer and contributor, blog tonybai.com author, has many years back-end service architecture design and development experience. Currently focused on Docker container and kubernetes research.This article starts from "The programmer", declin
Install the Tomcat image ready-to-use JDK Tomcat and other software to launch a virtual machine under the home directoryDocker run-t-i-v/home:/opt/data--name mk_tomcat Ubuntu/bin/bashThis command mounts the local home directory to the/opt/data directory of the virtual machine, and if the virtual machine directory does not exist, it is automatically created with the basic configuration of Tomcat next, and the JDK environment variable is set so that the
. dockercfg:ewojimf1dghzijogewojcsjidxmuz2eioib7cgkjcsjhdxroijogillxunrhvzq2wvdsdgfxnhhovgsztlrnpsikcql9cgl9cn0 =The master node in Kubernetes creates the secret:Kubectl create-f Secret.yamlSee if Secret is created:Kubectl Get SecretThen specify when you create the other elements: Imagespullsecrets.For example:Pod:Apiversion:v1Kind:podMetadataName:redis-testContainers
Name:redis-testImage:my.registry/redisImagepullsecrets:
Name:myregistry
connection, some may fail the connection, the workaround is as follows:Authorizing the database' Root '@'%'root' with GRANT OPTION;Special circumstances may still be unable to use, this time try to change the password, then connect, ok! This is just the situation I met.set authentication_string = password ('root'where' Root ';The connection was successful, which means that MySQL in Docker is already accessible in the LAN.Package project files, genera
is made by our dockerfile.This time we'll create the container without adding so many parameters.
The code is as follows
Copy Code
root@dev-ops:~# Docker run-d-P Rui116b30b056493237caca158849ae687c9beb4f8656be485c2a3cc71a27d8e951root@dev-ops:~#root@dev-ops:~#root@dev-ops:~# Docker Ps-aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NA
Docker host and Docker container target six. Learn to deploy the log management platform to collect and analyze container log target seven. Learn to use Docker-compose and achieve one-click Deployment Goal Eight. Learn to build Docker swarm and manage container cluster targ
Sometimes it is inconvenient to use a public repository such as Docker Hub, and the company's private images are not pushed to the docker hub for business security. You can create a local repository for private use. Similar to git and maven, it saves the server bandwidth for downloading and uploading images.What is docker registry?
. /appworkdir /apprun["Dnu","restore"]run ["Dnu","Build"] RUN rm-r/appThe principle is to copy the project file, then proceed dnu restore , and then delete the project file so that the desired NuGet package can be downloaded in the system. Publishing the base image to the Docker Hub can then be built with the following Dockerfile to save time.Little TricksAfter creating the underlying
cache system or application at any time.Understand the above two things, and then go to the application packaging link.Dockerfile PackagingFirst, let's look at the Dockerfile of the official Docker-packaged Tomcat image.As we can see, a lot of LINUX commands are executed to install and deploy the software, and the commands that need confirmation are added to-f to enforce. Ensure that there is no interactio
-dmaven.test.skip=true Tomcat7:redeployThe results of the implementation are as follows:The Ok,tomcat7-maven-plugin plugin has helped us deploy the war to the Docker container, and in the browser input:Http://192.168.1.129:8080/loadbalancedemo/hello?name= Zhang SanfengYou can see the following effects:The tomcat_server_001 of the blue font is the environment variable set by the-e parameter when we launch th
1, actual combat purposes
build an enterprise-private mirrored warehouse that meets push and pull mirroring from the development environment . When we use k8s to orchestrate and dispatch containers, the basic unit of the operation is mirroring, so we need to pull the mirror from the repository to the current working node. The use of a public Docker hub is perfectly suited to our needs and is very convenient, but the uploaded
run.sh script. The advantage of this is that you can use WebLogic concepts such as clustering, synchronization, and so on. Deploy a clustered application that only needs to be installed once to the cluster.? ? The disadvantages are:? ? The Docker configuration is complex.?? There is no way to automatically expand the compute capacity of the cluster, if you want to add nodes, you need to create a node on ad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.