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. 2017年IT行业测试调查报告

    在刚刚过去的2017年, 我们来一起看一下2017年IT行业测试调查报告 还是1到5名测试工程师最多 Test Architects 在北上广一线城市已经出现 https://www.lagou.co ...

  2. 前端入门23-CSS预处理器(Less&Sass)

    声明 本篇内容梳理自以下几个来源: Github:smyhvae/web Bootstrap网站的 less 文档 Sass中文网 感谢大佬们的分享. 正文-CSS预处理(less&Sass) ...

  3. Cookie 数据浅谈

    Cookie 是一些数据, 存储于你电脑上的文本文件中. 当 web 服务器向浏览器发送 web 页面时,在连接关闭后,服务端不会记录用户的信息.   Cookie 的作用就是用于解决 "如 ...

  4. 阅读笔记:基础知识(Java篇)

    1. GC机制(垃圾回收机制) 找到垃圾的方法:引用计数法.可达性分析法 回收垃圾的方法:标记清除算法.复制算法.标记整理法.分代算法 2. JVM内存划分 线程私有:程序计数器.JVM虚拟机栈.本地 ...

  5. MySQL 关于性能的参数配置梳理

    以下List是我们常见的MySQL参数配置,这个参数对提高实例的性能大有裨益. 其中 建议设置值,仅供参考,需要根据自己的业务场景和硬件资源仔细推敲. 参数 设置说明 建议设置值 lower_case ...

  6. sqlsever存储过程配合代理作业自动定时建表

    1.自动建表存储过程 USE [ThreeToOne] GO /****** Object:  StoredProcedure [dbo].[WTO_CreateTable_ScanDoXXX]    ...

  7. 【Linux基础】Linux命令date 日期时间

    1.显示到纳秒 date +%F.%H:%M:%S.%N --:38.740127086 date +%Y-%m-%d.%H:%M:%S.%N2019-04-25.00:28:24.060756673 ...

  8. dump解析入门-用VS解析dump文件进行排障

    突然有一天部署在服务器的一个应用挂掉了,没办法只能进入服务器打开 [事件查看器]查看下,好不容易找到了打开后一脸懵逼 事件查看器查到的内容根本对我们排障没有任何作用. 在这个时候如果有对应的dump文 ...

  9. 从Java小白到阿里巴巴工程师,回顾我两年来的学习经历

    添加描述

  10. 浅谈background-size的几个属性值

    前言: css应用中,我们常会碰到background-size的用法,不妨下面总结一下,以便后续查看. 一.先弄个简单的box框. <!DOCTYPE html> <html la ...