The previous talk of using wget to download JDK installation files from Oracle uses cookie spoofing to bypass authentication to use Dockerfile to install Oracle versions of the JDK in Ubuntu.However, the path is to use Apt-get to install the Oracle JDK, and now update a dockerfile configuration that uses Apt-get to install the Oracle JDK:1#VERSION 0.0.12 #默认ubuntu Server version3 From Ubuntu4 # Signature5Ma
Download the required package wget http://nginx.org/download/nginx-1.14.0.tar.gz in the nginx directoryWget https://ftp.pcre.org/pub/pcre/pcre2-10.23.tar.gz -- no-check-Certificate
The following is the meaning of the dockerfile command:
From inherited fromMaintainerWhat is run?Add to add a vertex FileCurrent workdir working directoryMount the volume directoryPort opened by exposeRun
Create dockerfileVI dockerfileContent:# This is my first
Dockerfile Building a Java Web environment
Dockfile Introduction:
Dockfile is a script that is interpreted by a Docker program, and Dockerfile consists of a single instruction, each of which corresponds to a command under Linux. The Docker program translates these dockerfile instructions into real Linux commands. Dockerfile
This will show you the process of using Dockerfile to create a Docker image with Apache services.Preparatory work:First, create a Apache_centos working directory in which[Email protected] ~]# mkdir apache_centos cd Apache_centos[email protected] apache_centos]# Touch Dockerfile run.sh[Email protected] apache_centos]# mkdir sample[email protected] apache_centos]# cat DockerfileFrom Docker.io/centos:latest#设
# One: Environment preparationcentos7.4 and well-built Docker
[Email protected] ~]# cat/etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)[Email protected] ~]# docker-vDocker version 17.03.2-ce, build f5ec1e2
# Two: Build the image of Nginx and PHP1.nginxCreate a base image
[Email protected]/]# vim DockerfileFrom CentOS
Maintainer liuning
Centos-base.repo.bakRUN Mv/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.bak
/etc/yum.repos.dCOPY Ce
Original address: http://blog.csdn.net/we_shell/article/details/38445979
Dockfile is a script that is interpreted by the Docker program, Dockerfile consists of a single instruction, each of which corresponds to a command under Linux. The Docker program translates these dockerfile instructions into real Linux commands. Dockerfile has its own writing format and su
1, in the host to create folders tomcat7.0_jdk1.7, download tomcat7.0 and JDK put into this directory[email protected] ~/tomcat7.0_jdk1.7 $ lsDockerfile apache-tomcat-7.0.68 JDK run.sh2, Write Dockerfile[email protected] ~/tomcat7.0_jdk1.7 $ cat DockerfileFrom sshd:centos6.5Maintainer created from [email protected]ENV Catalina_home/tomcatENV JAVA_HOME/JDKADD Apache-tomcat-7.0.68/tomcatADD JDK/JDKADD run.sh/run.shRUN chmod +x/*.shRUN chmod +x/tomcat/bi
Environment: OS X 10.10.5Maven 3.3.9Docker version 1.12.2Docker-machine version 0.8.2The program example is the service Discovery program mentioned in http://www.cnblogs.com/modprobe/p/6001333.htmlRelated code: Https://github.com/li-hong/spring-cloud-demoFirst, the preparation work, installs the Docker-toolboxMethod: Http://www.docker.com/products/docker-toolboxAfter installation, use Docker-machine to create a virtual machine with a Docker runtime environment, or run Toolbox build directlyComma
1. Writing. Dockerignore When you build the image, you do not need the Node_modules directory and so on, you can use the. Dockerignore Ignore the file#. dockerignoredockerfilenode_modules/ 2. Writing the Dockerfile file From Mhart/alpine-node:7label maintainer "test-nodejs.com" COPY localtime/etc/localtimeworkdir/appcopy Package.json/ Apprun apk--update add git apk--update Add Curl rm-rf/tmp/*/var/cache/apk/* A mp NPM Install npm
The ASP. NET Samples project on Git has already written the Docker file, the content is as follows?Any dockersfile must begin with a form, and the agreement is capitalized.From Microsoft/aspnet:1.0.0-rc1-update1?COPY. /appWorkdir/appCall Dnu's restore to get the latest environment from NuGet, since ASP. NET core is completely out of the GAC, So each project is equivalent to carrying a full set of operating environments. And the use of DNU's restore is the way Microsoft provides the answer to the
Generate. NET Core MVC CodeDocker RUN-ITD Microsoft/dotnet:latestDocker PSDocker Attach Containeridmkdir WebCD Webdotnet NEW-T WebIf you do not have a dotnet Docker image, refer to:Http://www.cnblogs.com/windchen/p/6235406.htmlPrepare code files and related filesPress Ctrl+p,ctrl+q to exit the containerCD ~mkdircp containerid:/web/./webReference http://www.cnblogs.com/windchen/p/6235406.htmlChange the Program.cs file under the Web directory, and also copy the Nuget.config file to the Web directo
Tags: docker1. Directory structure, put the configuration files here, and so on to copy into the image to 2.mongod.confNET:
port:27017
bindip:0.0.0.0
security:
authorization:enabled
systemlog:
Destination: File
path: "/data/log/mongod.log"
logappend:true
Storage:
dbPath: "/data/db"
# Processmanagement:
# Fork:true3. Dockerfile#FROM debian:wheezy Fromubuntu #addouruserandgroupfirstto makesuretheiridsgetassignedconsistently,regardlessof whateverdependen
Collated the document today to build mariadbHost or CentOS 172.16.0.200 build a second imagesmkdir./mysql-dockerfile Below is three filesDockerfile #构建mariadb-images mysqld_charset.cnf #mariadb #配置文件 The encoding format is setScript #目录内, storing three filesScript #目录下三个文件All right, let's take a look at one.DockerfileFrom docker.io/237356573@qq .com>#add system-/var/lib/Yum Install -y mariadb mariadb-server yum clean all#add Mysql.confadd mysqld
Dockerfike quickly create a custom Docker mirrorA, Table of contents1.docker Typical structure2. Instruction Introduction3. Create Docker Mirrors
Second, the structureThe Dockerfile is divided into four parts: the underlying mirror letter, the maintainer information, the mirroring operation instructions, and the execution instructions when the container starts. For example:
#第一行必须指令基于的基础镜像 from
Ubutu
#维护者信息
maintainer docker_user docker_user@mail.co
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.