这里不单独阐述什么是Docker和Dockerfile的作用。直接上代码,该Dockerfile用于 php 和 node 和python基本环境,主要是个人使用和这个blog背后的host。
FROM php:7.2-fpm
MAINTAINER lokie.wang@5imakeup.com
COPY sources.list /etc/apt/sources.list
RUN apt-get update && apt-get install -y vim
RUN apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libssl-dev \
zip \
&& docker-php-ext-install -j$(nproc) iconv mysqli \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install tokenizer \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install zip
RUN apt-get install -y libmemcached-dev && pecl install memcached && docker-php-ext-enable memcached
RUN pecl install redis && docker-php-ext-enable redis
RUN pecl install yaf && docker-php-ext-enable yaf
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && /usr/local/bin/composer config -g repo.packagist composer https://packagist.laravel-china.org
RUN mkdir /workspce
RUN mkdir /deployment
WORKDIR /deployment
RUN apt-get install -y python
RUN apt-get install -y wget gnupg
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
本文为Lokie.Wang原创文章,转载无需和我联系,但请注明来自lokie博客http://lokie.wang