1. 程式人生 > >DockerFile一鍵搭建環境(一)

DockerFile一鍵搭建環境(一)

-c oot rfi ref b- nginx git tar.gz fig

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 \

DockerFile一鍵搭建環境(一)