• dockerfile_lamp


    # centos7SSHDv1.0
    FROM centos:7
    
    RUN yum install -y lftp wget
    
    RUN mv /etc/yum.repos.d/*.repo /tmp 
    
    && echo -e "[ftp] name=ftpbase baseurl=ftp://172.17.0.1/pub enabled=1 gpgcheck=0 ">/etc/yum.repos.d/ftp.repo RUN wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && rpm -ivh mysql-community-release-el7-5.noarch.rpm RUN yum install -y vim net-tools openssh-server* httpd php php-mysql wget mysql-server mysql ADD init.sh / ADD Discuz.tar.gz /var/www/ RUN chmod 777 -R /var/www/html RUN chmod +x /init.sh &&sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config &&sed -i "s/#UseDNS.*/UseDNS no/g" /etc/ssh/sshd_config &&sed -i "s/GSSAPIAuthentication.*/GSSAPIAuthentication no/g" /etc/ssh/sshd_config &&echo 【xxxx】 |passwd root --stdin RUN sed -i "s/AddDefaultCharset UTF-8/AddDefaultCharset GB2312/g" /etc/httpd/conf/httpd.conf RUN systemctl enable sshd mysqld httpd CMD ["/usr/sbin/init","/init.sh"] EXPOSE 22 EXPOSE 3306 EXPOSE 80
    [root@test2 CentOSLAMP]# cat init.sh 
    #!/bin/bash
    systemctl restart mysqld
    mysql -e "GRANT ALL  ON *.* TO 'root'@'%' IDENTIFIED BY '123qwe';GRANT ALL  ON *.* TO 'root'@'localhost' IDENTIFIED BY '123qwe';delete from mysql.user where user = '';delete from mysql.user where password='';create database d;GRANT ALL  ON d.* TO 'd'@'%' IDENTIFIED BY '123456';flush privileges;"

     

    docker image build -t "c1:v1" ./

  • 相关阅读:
    mvc生成table
    JQ仿ebay右侧flash商品展示
    调查一下,EF的Bug?
    SpringCloud组件Zuul入门解析
    SpringCloud组件Ribbon入门解析
    FTO介绍
    算法网址收藏
    哈拂大学凌晨四点的景象
    【系统学习ES6】第二节:解构赋值
    MySQL高级
  • 原文地址:https://www.cnblogs.com/Leaders543/p/12632215.html
Copyright © 2020-2023  润新知