ObjectiveIn the first text, we completely manual, a command of a command input, implementation of a Java Tomcat runtime environment, although the initial results, but very tiring. If you rely on scripting to build a Tomcat container instance, a command can be done, why not. Fortunately, Docker provides dockerfile as a script to build Docker images, avoiding the input of people on one line. Dockerfile script
in this way, the download process is also extremely frustrating, helpless, had to download the relevant RPM package, put in the local MySQL directory, through the Add command to copy the files in the directory into the Mirror. Note:/mysql is a relative path relative to Dockerfile, because the absolute path of my Dockerfile is/root/dockerfile, so the absolute pat
Back to CatalogUncle feel online on the dockerfile is not very clear, or how to use said not clear, in vs2017 we can go to build their own dockerfile file, then your project can be generated a mirror, push it to the warehouse, you can in Linux, Mac go on run your project! Sounds great, but the process does have some pits!The answer in Dockerfile
From bas
Building a Java Web environment with Dockerfile is mainly divided into 2 steps, the first step is to install the JDK in the mirror and configure the environment variables, and the second step is to install Tomcat.
Let's put up a complete dockerfile.
From ubuntu:14.04
Maintainer * * * ***@******.com "
RUN apt-get update
ADD jdk-8u77-linux-x64.tar.gz/usr/ Local/java
env java_home/usr/local/java/j
Tags: base l database name load PNG add ash Add ClassLab Environment Description本机IP地址:192.168.10.157
构建mysql镜像时,验证的主机IP;192.168.10.149Build nginx image 1, download the base image--centos imagedocker pull centos2. Create a working directorymkdir /opt/nginx
cd /opt/nginx/3. Create and write Dockerfile filesvim Dockerfile
FROM centos
MAINTAINER this is nginx image 4. Write Execution script contentvim run.sh
The example of this article for you to share the Dockerfile to create support for SSH service from the launch of the container mirror, for your reference, the specific content as follows
1. First create a Dockerfile file with the following contents
# Select an existing OS mirror as
the author of the base from CENTOS:CENTOS6 # mirror
maintainer fanbin Kong "kongxx@hotmail.com"
# Install the Openss
Tags: dockerfile create with MongoDBMongoDB is a scalable, high-performance open source document (document-oriented) database. It is developed in C + +, supports complex data types and powerful query language, and provides most of the functions of relational databases. MongoDB has been widely used in various fields because of its high performance, easy to deploy and easy to use.① Download FileDownload the MongoDB mirroring project from the GitHub Dock
Dockerfile implements the client to access the container's desktop and pseudo terminal through the Web page, the main tool is guacamole.First of all, the Guacamole,guacamole is a VNC client based on HTML5 and Ajax technology, with which it can quickly access the Xwindows system interface on the VNC server directly through a Web browser. Youku has a video presentation on guacamole in http://v.youku.com/v_show/id_XMTg4ODgwNDg0.htmlgit on
1. Java DockerfileCreate the project directory Java, upload the required Java version of the compressed package in the directory, and create the Dockerfile file, the project structure is as follows:Java-dockerfile-jdk-8u111-linux-x64.gzDockerfile content:# java# Version 1.8.0_111# source_imagefrom centos# maintainer_infomaintainer bluemooder [email protected]add jdk-8u111-linux-x64.gz/usr/local/# envenv jav
Dockerfile Creating a mirrored –dockerfile example installing NginxDownload the Nginx configuration file to the current directory wget http://www.apelearn.com/study_v2/.nginx_confVim Dockerfile//content as follows############################################################## Dockerfile to build Nginx installed Containe
To create your own Docker image, the best way is to use the Dockerfile file, in the process of use, due to problems in the domestic network environment, the process of creating the image may be due to the need to download the software is not available in time, may cause the image created error. In order to solve this problem, when writing dockerfile, you can use the Run command, the source address of the so
The command used in Dockerfile has a base image specified from the from from, and in general a usable dockerfile must be from for the first instruction.
As for the image, it can be any image image that is reasonably present.
The from must be the first non-annotated instruction Dockerfile.
The from can appear multiple times in a
containers to be shared.Ii. creating a mount point from DockerfileThe mount points that are created above with the-V identity of the Docker Run command are valid only for the container that you create.The dockerfile VOLUME instruction allows you to create a mount point in the mirror so that only the containers created through the image have mount points.Another difference is that the mount point created by the VOLUME instruction cannot specify the co
1. Create related catalogue[[Email protected]~]# mkdir/docker/sshd–p2. Write Dockerfile[Email protected]]# vim Dockerfile# This is a dockerfile# Version 1# by Kevin# Base ImageFrom CentOS# maintainerMaintainer Kevin kevinhao.blog.51cto.com# Commands# Install and Configure sshdRUN Yum Install-yopenssh-serverRUN sed-i ' s/usepam yes/usepam no/g '/etc/ssh/sshd_confi
Dockerfile
From base Mirror
Maintainer maintain this information
What command runs run, plus run in front of the command
Add to add some files, copy files, will automatically extract
Workdir the current working directory
VOLUME Directory Mount
Expose Open ports
The run process has to be running
Combat: Building Nginx
wget http://xiazai.jb51.net/201611/yuanma/nginx-1.9.3 (jb51.net). rar
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/p
Start by creating a CentOS container #docker create CENTOS:CENOS6
Deletes a container. A005304E4E74 (Mirror ID)-F parameter is forced to delete, sometimes dependencies will not remove Docker rmi-f a005304e4e74
View current container: Docker images
If you have the following information: Create the image successfully CentOS CENTOS6 a005304e4e74 weeks ago 203.1 MB
Enter the container:
#docker run-t-I. CENTOS:CENTOS6
Create a directory (if successful, display the following terminal, 061a24a8acca
Tags: monogdb service mirror① view content, including written dockerfile and a number of scripts.Download the MongoDB mirroring project from the GitHub Dockerpool community account:git clone https://github.com/DockerPool/Mongodb.git and modify the file[[email protected] mongodb]# lsDockerfile Mongodb-3.2.repo mongodb-linux-x86_64-rhel70-3.6.0.tgz run.sh set_mongodb_password.shThe contents of Dockerfile incl
There is a problem with using Docker to deploy ASP. NET core in Ubuntu today, when the Docker build is always the last hintLstat obj/docker/publish:no such file or directory.And when performing Docker images to view the image, the repository and tag of the generated image are all Prompt when performing Docker runUnable to find image ' crm:latest ' locallyLenovo to build when the last hint of the obj/docker/publish is supposed to be the problem of this piece. View
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.