DockerFile一键搭建环境(一)

FROM centos:7 COPY --chown=root:root nginx /etc/init.d/ Run set -ex \ && yum install -y wget \ git \ net-tools \ vim \ # 安装 ip initscripts \ # 安装 memcached memcached \ # 安装 crontab crontabs \ # 安装redis && yum install -y epel-release \ && yum install -y redis \ && systemctl enable redis \ # 安装 gcc-c++ [nginx需要] && yum install -y gcc gcc-c++ \ # 安装 pcre pcre-devel [nginx需要] && yum install -y pcre pcre-devel \ # 安装 zlib zlib-devel [nginx需要] && yum install -y zlib zlib-devel \ # 安装make && yum install -y gcc automake autoconf libtool make \ # 安装nginx && cd /opt \ && wget -c https://nginx.org/download/nginx-1.14.2.tar.gz \ && tar -zxvf nginx-1.14.2.tar.gz \ && cd nginx-1.14.2 \ && ./configure --prefix=/usr/local/nginx \ && make \ && make install \ # 将nginx安装到系统服务并设置开机自启 && chmod 755 /etc/init.d/nginx \ && chkconfig --add nginx \ && chkconfig nginx on \

猜你喜欢

转载自www.cnblogs.com/lingxu/p/10616581.html