2024技能大赛云计算赛项先电2

[root@master mysql]# ll

total 72

-rw-r–r-- 1 root root 381 Apr 7 11:21 Dockerfile

-rw-r–r-- 1 root root 169 Apr 7 11:20 ftp.repo

-rw-r–r-- 1 root root 59239 Dec 30 12:09 gpmall.sql

-rw-r–r-- 1 root root 341 Apr 7 17:12 init.sh

[root@master mysql]# cat Dockerfile

FROM 192.168.200.4/library/centos:centos7.5.1804

MAINTAINER Chinaskill

RUN rm -rvf /etc/yum.repos.d/*

ADD ftp.repo /etc/yum.repos.d/

ADD gpmall.sql /root/

RUN yum install -y mariadb-server

RUN sed -i “13cport = 8066” /etc/my.cnf.d/server.cnf

ADD init.sh /root/init.sh

RUN chmod +x /root/init.sh

RUN /root/init.sh

ENV LC_ALL en_US.UTF-8

EXPOSE 3306

EXPOSE 8066

CMD [“mysqld_safe”]

[root@master mysql]# cat ftp.repo

[k8s]

name=k8s

baseurl=ftp://192.168.200.4/ChinaskillMall/gpmall-repo

gpgcheck=0

enabled=1

[centos]

name=centos

baseurl=ftp://192.168.100.10/centos

gpgcheck=0

enabled=1

四、Redis环境

========================================================================

[root@master redis]# ls

Dockerfile ftp.repo

[root@master redis]# cat Dockerfile

FROM 192.168.200.4/library/centos:centos7.5.1804

MAINTAINER Chinaskill

RUN rm -rvf /etc/yum.repos.d/*

COPY ftp.repo /etc/yum.repos.d/local.repo

RUN yum clean all

RUN yum list

RUN yum -y install redis

RUN sed -i -e ‘s@bind 127.0.0.1@bind 0.0.0.0@g’ /etc/redis.conf

RUN sed -i -e ‘s@protected-mode yes@protected-mode no@g’ /etc/redis.conf

RUN sed -i -e ‘s@daemonize yes@daemonize no@g’ /etc/redis.conf

EXPOSE 6379

ENTRYPOINT redis-server /etc/redis.conf

CMD [“redis-server”]

五、Zookeeper环境

============================================================================

[root@master zookeeper]# ls

Dockerfile ftp.repo zookeeper-3.4.14.tar.gz

[root@master zookeeper]# cat Dockerfile

FROM 192.168.200.4/library/centos:centos7.5.1804

MAINTAINER Chinaskill

RUN rm -rvf /etc/yum.repos.d/*

COPY ftp.repo /etc/yum.repos.d/local.repo

RUN yum -y install java-1.8.0

ADD zookeeper-3.4.14.tar.gz /usr/local

六、Docker-compose

===============================================================================

[root@master ~]# cd docker-compose/

[root@master docker-compose]# cat docker-compose.yaml

version: ‘2’

services:

zk1.mall:

image: chinaskillmall-zookeeper:v1.1

restart: always

expose:

  • 2181

  • 2888

  • 3888

volumes:

  • ./zookeeper1/conf:/usr/local/zookeeper-3.4.14/conf

  • ./zookeeper1/data:/data

zk2.mall:

image: chinaskillmall-zookeeper:v1.1

restart: always

expose:

  • 2181

  • 2888

  • 3888

volumes:

  • ./zookeeper2/conf:/usr/local/zookeeper-3.4.14/conf

  • ./zookeeper2/data:/data

常用的JavaScript设计模式

  • 单体模式

  • 工厂模式

  • 例模式

函数

  • 函数的定义

  • 局部变量和全局变量

  • 返回值

  • 匿名函数

  • 自运行函数

  • 闭包

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值