Git Product home page Git Product logo

my-docker's Introduction

前言

php-fpm7.0配置及描述 ---多年以前,本打算详细写完,现在已经废弃


新 的 开 始

目前编排的镜像📝

  • php7.2
  • mysql5.7
  • nginx
  • redis
  • beanstalkd
  • mailHog

后面会慢慢加。。。

简介 👇

新的镜像使用alpine 进行构建(而原镜像使用的是ubuntu),使镜像文件大小从几百M 变为几十M

  • PHP:的镜像大小对比

镜像大小对比

  • nginx 镜像大小对比

镜像大小对比

怎么玩? 🚀

我使用的环境是ubuntu16.04

#1.脚本自动安装docker和docker-compose(已经安装请跳过这一步)
    #1.克隆项目
    git clone https://github.com/piaohan/my-docker.git
    
    #2.进入项目
    cd my-docker
    
    #3.将脚本修改为可执行(如果第4步命令可以执行 请跳过这一步)
    chmod +x get-docker.sh
    
    #4.执行该脚本(不能执行,请参考上一步)
    ./get-docker.sh

#2.使用docker-compose编排自动构建环境(相关的环境需求可以修改 docker-compose.yml 文件)
    #1.启动(首次运行请加上 --build 参数)
    docker-compose up -d [--build] 
    
    #2.停止并销毁容器
    docker-compose down
    
    #3.更多相关指令 请使用 -h 查看

有一点想法的 🤔

其实 我是想直接一个脚本 然后就安装并且部署docker环境的,只是觉得不是很合适。 所以还是分的2步:1.是安装docker环境 2.是执行docker-compose编排

注意

1.使用docker需要知道镜像和容器的概念,注意分区

2.如有不希望使用的服务请修改根目录下面的 docker-compose.yml 文件,将不需要的服务注释或者删掉就好

3.希望能给我提供宝贵的建议,不要忘了给我个星星 谢谢

my-docker's People

Contributors

myleoscott avatar piaohan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.