code:

FROM php:7.1.26-fpm
WORKDIR /usr/share/nginx/html # bcmath pdo_mysql intl gd zip opcache xdebug redis memcached
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
git \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxml2-dev \
libmemcached-dev \
unzip \
zip \
zlib1g-dev \
libxslt-dev \
libmcrypt-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure intl \
&& docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-configure mcrypt \
&& docker-php-ext-install -j$(nproc) gd intl bcmath pdo_mysql zip xsl opcache mcrypt json soap \
&& pecl install redis xdebug memcached \
&& docker-php-ext-enable redis xdebug memcached \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* # Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Mailhog
COPY mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
RUN chmod +x /usr/local/bin/mhsendmail RUN usermod -u 1000 www-data

  

切换到目录执行:docker build .  ;

Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
--add-host list Add a custom host-to-IP mapping (host:ip)
--build-arg list Set build-time variables
--cache-from strings Images to consider as cache sources
--cgroup-parent string Optional parent cgroup for the container
--compress Compress the build context using gzip
--cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
-c, --cpu-shares int CPU shares (relative weight)
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
--disable-content-trust Skip image verification (default true)
-f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
--force-rm Always remove intermediate containers
--iidfile string Write the image ID to the file
--isolation string Container isolation technology
--label list Set metadata for an image
-m, --memory bytes Memory limit
--memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--network string Set the networking mode for the RUN instructions during build (default "default")
--no-cache Do not use cache when building the image
--platform string Set platform if server is multi-platform capable
--pull Always attempt to pull a newer version of the image
-q, --quiet Suppress the build output and print image ID on success
--rm Remove intermediate containers after a successful build (default true)
--security-opt strings Security options
--shm-size bytes Size of /dev/shm
--squash Squash newly built layers into a single new layer
--stream Stream attaches to server to negotiate build context
-t, --tag list Name and optionally a tag in the 'name:tag' format
--target string Set the target build stage to build.
--ulimit ulimit Ulimit options (default [])

docker-lnmp dockerfile的更多相关文章

  1. docker:Dockerfile构建LNMP平台

    docker:Dockerfile构建LNMP平台   1.dockerfile介绍  Dockerfile是Docker用来构建镜像的文本文件,包含自定义的指令和格式.可以通过docker buil ...

  2. 使用 Docker LNMP 部署 PHP 运行环境

    简介 Docker LNMP 是基于 Docker 的 PHP 集成开发环境. Github 地址:https://github.com/YanlongMa/docker-lnmp 包含软件 ngin ...

  3. Centos7安装Docker 基于Dockerfile 搭建httpd运行环境

    Centos7安装Docker 基于Dockerfile 搭建httpd运行环境 docker docker搭建 docker build 本文档完成目标内容如下 使用Docker搭建http服务器一 ...

  4. docker 13 dockerfile的保留字指令

    Dockerfile是用来构建Docker镜像的构建文件,是由一系列命令和参数构成的脚本. 构建三步骤:1.编写dockerfile文件:2.docker build:3.docker run doc ...

  5. docker之Dockerfile指令介绍

    Docker通过对于在Dockerfile中的一系列指令的顺序解析实现自动的image的构建 通过使用build命令,根据Dockerfiel的描述来构建镜像 通过源代码路径的方式 通过标准输入流的方 ...

  6. Docker、Dockerfile、Docker镜像、容器这些都是什么鸟?

    老生常谈,再再再……普及一下: Docker:最早是dotCloud公司出品的一套容器管理工具,但后来Docker慢慢火起来了,连公司名字都从dotCloud改成Docker. Dockerfile: ...

  7. Docker使用Dockerfile创建支持ssh服务自启动的容器镜像

    原文链接:Docker使用Dockerfile创建支持ssh服务自启动的容器镜像 1. 首先创建一个Dockerfile文件.文件内容例如以下 # 选择一个已有的os镜像作为基础 FROM cento ...

  8. (转)Docker 基础 : Dockerfile

    全文来自 Docker 基础 : Dockerfile Dockerfile 是一个文本格式的配置文件,用户可以使用 Dockerfile 快速创建自定义的镜像.我们会先介绍 Dockerfile 的 ...

  9. 【docker】Dockerfile

    [docker]Dockerfile 转载: ============================================================= =============== ...

  10. Docker 0x05: Dockerfile制作镜像

    目录 Dockerfile制作镜像 一句话什么是dockerfile dockerfile脚本指令 小结 Dockerfile制作镜像 dockerfile 可以是制作自己镜像的脚本文件,按照这个脚本 ...

随机推荐

  1. IT技术团队管理之成长

    ------------------------------------------------------------------ 今天先到这儿,希望对您技术领导力, 企业管理,系统架构设计与评估, ...

  2. C# 2进制、8进制、10进制、16进制...各种进制间的转换(三) 数值运算和位运算

    一.数值运算 各进制的数值计算很简单,把各进制数转换成 十进制数进行计算,然后再转换成原类型即可. 举例 :二进制之间的加法 /// <summary> /// 二进制之间的加法 /// ...

  3. java集合(1)

    java集合类存放于java.util包里,只能存放对象,存放的是对象的引用,可以是不同类型,不限数量的数据类型. 顶层接口:Iterator(迭代器),Map Iterator:核心方法hasNex ...

  4. 微信公众号签名错误 invalid signature

    在出现了 invalid signature签名错误后按照以下步骤进行校验1.确认签名算法正确,可用 http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=j ...

  5. flex-骰子布局

    弹性容器单行:主轴居中,交叉轴居中. display: flex; flex-direction: row; align-items: center; justify-content: center; ...

  6. Golang学习笔记(一)

    这个系列学习文章是对ASTAXIE大神的GoWeb编程的读书笔记. 1. 关于GOPATH $GOPATH 是系统中重要的环境变量,他不是Go的安装目录. 假如我们将GOPATH设置在这里: /hom ...

  7. solr8.0 springboot整合solr(四)

    引言: solr搭建起后,就该应用到java后台开发里了,接下来就用springboot整合应用solr 一:引入jar包 <!--solr--> <dependency> & ...

  8. 一起学Android之ToggleButton和Switch

    本文以一个简单的小例子,简述在Android开发中ToggleButton(开关按钮)和Switch(开关)的简单使用,仅供学习分享使用. 概述 ToggleButton是一个有两种状态(checke ...

  9. dbgrideh 哪些行被选中了

    在dbgrideh中允许选择多行,如何知道哪些行被选中是个BOOKMARK类型的属性.SelectedRows: TBookmarkListprocedure TForm1.Button1Click( ...

  10. vsftpd.configro

    mmp卸载了vsftpd后 配置文件没了 安装也没有 留个做备份 嘿嘿 原始的: # Please see vsftpd.conf. for all compiled in defaults. # # ...