DockerFile parameter explanation

Source: Internet
Author: User

Docker command: from---
ENV---setting environment variables
ENV app_dir/apppadd and copy can copy files into the container1. Difference add can write network link address Add support decompression function Run command: entrypoint: Only last entry effective Docker build-T register_ip/Centos7. Helping Docker help run-P and-P Difference:-P arbitrarily fetch a port number mapping # Important effect The current mirror does not take effect # when it is re-set as mirroring Onbuild Add./app//Enter interactive mode:Docker exec-it container name/bin/Bash//keep our database down.VOLume ShellSet-e # when it's wrong, don't go on===============================Docker Run-d-p3306:3306-v Host_dir (host): Container_dir (Container) DockerFile. Dockerignore Write non-committed files here Docker-d-p the: the-E Database_name=MySQL-e is the difference between configuration parameters entrypoint and cmd only the last one takes effect, running a Docker container like running a program CMD will overwrite the instructions can be done via Docker run-it--entrypoint=/bin/bash
##maintainer Carson,c.j.zeong <[email protected]>#docker-version 1.6.2##dockerizing php-fpm:dockerfile for building php-fpm images#From csphere/centos:7.1Maintainer Carson, C.j.zeong <[email protected]>#Set environment variableENV App_dir/Apprun Yum-Y swap--Remove FAKESYSTEMD--install systemd systemd-libs &&Yum-y install Nginx php-cli php-MySQLPhp-pear php-ldap php-mbstring php-soap php-dom php-gd php-xmlrpc php-fpm php-mcrypt &&\ Yum Clean alladd nginx_nginx. Conf/etc/nginx/nginx.Confadd Nginx_default. conf/etc/nginx/conf.d/default.Confadd php_www. conf/etc/php-fpm.d/www.confrun sed-I ' s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/'/etc/php.Inirunmkdir-p/app &&Echo"<?php phpinfo ();?>" > ${app_dir}/info.Phpexpose80 443ADD Supervisor_nginx. Conf/etc/supervisor.conf.d/nginx.Confadd supervisor_php-FPM.CONF/ETC/SUPERVISOR.CONF.D/PHP-FPM.Confonbuild ADD. /Apponbuild RUNChown-R Nginx:nginx/app

DockerFile parameter explanation

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.