roma镜像构建dockerFile笔记

FROM          centos:7.6.1810
#安装一些中文包。保重中文不乱码
RUN  yum -y install kde-l10n-Chinese telnet && \
              yum clean all  && \
                localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
#设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV LC_ALL "zh_CN.UTF-8"

#把java与添加到/usr/local目录中
ADD jdk-8u181-linux-x64.rpm /usr/local/
#将roma tar包拷贝到/data/rsd目录下
ADD roma-server.tar.gz /data/rsd
#执行命令安装java
RUN rpm -ivh /usr/local/jdk-8u181-linux-x64.rpm
#配置java与roma的环境变量
ENV JAVA_HOME /usr/local/jdk1.8.0_11
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV ROMA_HOME /data/rsd/roma-server
ENV ROMA_BASE /data/rsd/roma-server
ENV PATH $PATH:$JAVA_HOME/bin:$DATAX_HOME/lib:$ROMA_HOME/bin

 

 

 

 

 

agent server 

 

kind: Deployment
apiVersion: apps/v1
metadata:
  name: agent-server
  labels:
    k8s-app: agent-server
spec:
  replicas: 2
  selector:
    matchLabels:
      k8s-app: agent-server
  template:
    metadata:
      labels:
        k8s-app: agent-server
    spec:
      volumes:
      - name: agent-persistent-storage
        hostPath:
          path: "/data/share/"
          type: ''
      containers:
      - name: centosrongan
        image: registry.cn-hangzhou.aliyuncs.com/rongan/rsd.roma-agentserver:1.1.0
        imagePullPolicy: IfNotPresent
        command:
        - "/bin/sh"
        - "-c"
       # resources:
          #limits:
           # cpu: 200
           # memory: 500Mi
        volumeMounts:
        - name: agent-persistent-storage
          mountPath: "/data/share/"
---
#种类 service
kind: Service
#apiVersion固定写法
apiVersion: v1
#元数据信息
metadata:
  #代理名称
  name: agent-server
  #代理所在的名称空间
  namespace: default
spec:
  ports:
   - protocol: TCP
     port: 449
     #要代理的pod上的端口
     targetPort: 9999
     #在宿主机上开启的端口
     nodePort: 30010
  type: NodePort
  #要代理pod的标签
  selector:
    k8s-app: agent-server

---
#apiVersion: autoscaling/v1
#kind: HorizontalPodAutoscaler
#metadata:
#  name: agent-server
#  namespace: default
#spec:
#  maxReplicas: 5
#  minReplicas: 1
#  scaleTargetRef:
#    apiVersion: apps/v1
#    kind: Deployment
#    name: agent-server
#  targetCPUUtilizationPercentage: 90

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页