Using Dockerfile to create CentOS Docker mirrors with Apache services
List of files prepared on the host:
Dockerfile
#启动ssh和apache服务的角本
run.sh
The above files are placed in the/root/apache_centos directory
Mkdir-p/root/apache_centos
Cd/root/apache_centos
Base mirroring: Mirroring of open SSH services based on mirrored CentOS
[Root@localhost apache_centos]#
1. When using MAVEN, the project first adds the auto-install MAVEN to the global Tool configuration and then adds the Maven top-level MAVEN targets in the project's build The Maven ID you just added is selected in version, otherwise the following error is reported:Fatal:command Execution Failedjava.io.IOException:Cannot Run program ' MVN ' (in directory/var/jenkins_home/workspace/ Jettydocker "): error=2, No such file or Directoryat Java.lang.ProcessB
1. Download the dind imageDocker Pull Docker:dind2. Perform the imageDocker run-it--privileged--name some-docker-d docker:dind3. In-mirror processing--no-cache Icu-libs4. Download the Dotnet tar packageHTTPS://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.302-linux-x64-alpine-binaries Very clear for theHTTPS://download.microsoft.com/download/4/0/9/40920432-3302-47a8-b13c-bbc4848ad114/ Dotnet-sdk-2.1.302-linux-musl-x64.tar.gz5. Copy to the ho
See all images
sudo docker images
Generate container
sudo docker run-it--net=host-v/home/tingting/dropbox/code/craterdetection/docker:/root/with an image Workspace Tingting/caffe:version1 Bash
Open Jupyter Notebook
Jupyter Notebook
In the browser, type: localhost:8890It is important to
With a learning attitude, I want to know how to create a basic docker image. So I found a description on the official docker website:
First, the creation of base image is related to the Linux release version to be created. Different releases are different.
The following are examples:
Use the tar command to create a complete imageUse debootstrap to create Ubuntu base image
$sudodebootstrapraringraring>/de
1, modify httpd.confNote characters before the following two lines are removed: #LoadModule proxy_module modules/mod_proxy.so#loadmodule proxy_http_module modules/mod_proxy_http.so2, adding proxy rulesAt the end of the httpd.conf file, add a forwarding rule for example: Proxypass/baidu Http://www.baidu.comProxyPassReverse/baidu http://www.baidu.com will/ Baidu start of the request forwarded to the homepage3, after the configuration file is changed, create the dockerfile in the sibling directory.
Docker container with the following command:Docker run--name mysql5.7-p 3306:3306-e mysql_root_password=123456-d mysql:5.7Note that the container name here is: Mysql5.7,mysql root user password is: 123456, map host child port 3306 to container Port 3306, warehouse name MySQL and tag (tag) uniquely determine the image to be specified, In fact, if there is only one MySQL is also necessary to tag, the result of executing the command returned is:9238d9fe
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 administrator, then configure the new container
Create a Tomcat/Weblogic cluster using Docker
Install Tomcat Image
Prepare required software such as jdk and tomcat in the home directory and start a container.Docker run-t-I-v/home:/opt/data -- name mk_tomcat Ubuntu/bin/bash
This command mounts the local home directory to the/opt/data directory of the container. If the directory in the container does not exist, it is automatically created. The next step is
1. Installing DockerThe system environment I am currently using is CentOS7 , and the command to install Docker is the yum install docker*. As for other systems, you can go to Baidu to find its corresponding installation method.2. Configure the address of the Docker image warehouseFor now, direct access to the Docker's
-y may be used for the next instruction.
The--no-cache flag can be used to force cancellation of cache usage. The Env ENV directive can be used to set environment variables for the Docker container environment variable env settings, which can be viewed using the Docker inspect command.
You can also use Docker run--env
1. Environment:Lsb_release-a[Email protected]:~$ lsb_release-aNo LSB modules is available.Distributor Id:ubuntuDescription:ubuntu 16.04.3 LTSrelease:16.04Codename:xenial2. Install Docker first and run it (already written and not repeat)3. Pull the imagedocker pull yinheli/docker-thunder-xware:latest4. Create a download directorymkdir Thunder (randomly created, author is created in the current user's home di
The connection between Docker containers can be a lot of convenience, and the following records how the Redis container connected to it is connected through environment variables within its own container.Start with a Redis docker container named Redis, and then start your own Docker container, using "--link Redis:redis
using Supermin to make CentOS Docker mirrors
Install the supermin on the CentOS7
$ sudo yum install-y supermin*
Create MIRROR (The following command needs to run with root)
# supermin5-v--prepare bash coreutils-o supermin.d
# supermin5-v--build--format chroot supermin.d-o
# echo 7 > Appliance.d/etc/yum/vars/releasever
# tar--numeric-owner-cpf centos-7.tar-c appliance.d.
# Cat Centos-7.tar |
Using Docker in Mac is actually using Boot2docker to start a Linux virtual machine "BOOT2DOCKER-VM"first through VirtualBox, so that after startup, Starting container from Docker, even if you add a port mapping, the host is inaccessible because this port mapping is the port that maps VirtualBox-initiated virtual machin
Significance
An enormous shortening of the Android development to the test to the distance of the product to the channel.Lighten the burden for Android programmers.Google's environment is already in place, and it's obviously not going to have much of a hole in the Docker (mistakes, escapes).Dockerfile
Https://github.com/lijianying10/FixLinux/blob/master/dockerfiles/androidautobuild/Dockerfile
The story of team collaboration
At the stand-up meeting
ubuntu16.04 new two Docker containers using Docker to build a Java+tomcat+nginx reverse proxy dockerrun-it--name tomcat-mysql-v/mnt:/mnt-p8866:80-p33006:3306ubuntu/bin/ bashdockerrun-itd--namewebserver-p8888:80-v/mnt/:/mnt/ ubuntu/bin/bash[emailprotected]:~#dockerps-acontainerid IMAGE commandcreated STATUS PORTS names82756bbf1a00 ubuntu "/bin/bash" 53minutesago
Objective: To create an Apache-hosted image and launch 5 Apache containers from within a Linux external service1. Installing ApacheDocker run-t-I--name=qxy_apache centosyuminstall httpdexit2. Make imageDocker commit Qxy_apache Qxy_apache:v1. 0 [email protected]-1 ~]# Docker imagesrepository TAG IMAGE ID CREATED VIRTUAL sizeqxy_apache v1. 0 9b6f8b6054b5 seconds ago 19
There are many ways to deploy Meteor applications:
Compile into a node. JS app and deploy it Yourself (PM2, forever ... )
Using MUP or MUPX
Deploying on the Galaxy platform
Using Docker
Various deployment scenarios have their own characteristics, this article does not do a detailed comparison, here is a brief introduction of how to use
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.