• Dockerfile部署jar项目

    发布于:2020-05-07 作者:Garany 评论(0) 引用(0) 浏览(483)   分类:破万卷书  

    1.Dockerfile # vim Dockerfile FROM java:8 ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone COPY trip-eureka-1.0.jar /app/eureka.jar EXPOSE 8761 ENTRYPOINT ["java","-Xms512m","-Xmx512m","-Xss256k","-Dlogging.file=/swallow/log/eureka.log","-jar","/app/eureka.jar"] 2.docker build # docker build -t eureka . 3.docker run # docker run -itd --name eureka -p 8080:8761 -v /swallow/log/eureka.log:/s...

    阅读全文>>

  • redis监控内存脚本遇到的 ^M问题

    发布于:2020-04-15 作者:Garany 评论(0) 引用(0) 浏览(227)    

    1.脚本内容 # cat /usr/local/sbin/redis_memory.sh #!/bin/bash a=$(/usr/local/redis/bin/redis-cli -h 127.0.0.1 -a wang.123 -p 6479 info memory |sed -n '/used_memory_human/p' |awk -F: '{print $2}' |sed 's/[a-Z]//g') if [[ `echo "$a > 5.10"|bc` -eq 1 ]]; then echo -e "Redis Memory usage exceeds limit!" else exit fi 2.报错 (standard_in) 1: illegal character: ^M 3.加上执行过程 sh -x /usr/local/sbin/redis_memory.sh ++ /usr/local/redis/bin/redis-cli -h 127.0.0.1 -a wang...

    阅读全文>>

    标签: linux redis shell