k8s记录-docker-compose脚本参考
Posted xinfang520
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了k8s记录-docker-compose脚本参考相关的知识,希望对你有一定的参考价值。
#!/bin/bash set -e base="$(cd `dirname $0`; pwd)" if [ ! -f "$base/xxx.tar" ];then echo "Not xxx images can‘t be load" exit fi if [ ! -f "$base/xxx.tar" ];then echo "Not xxx images can‘t be load" exit fi if [ ! -d "$base/xxx" ];then mkdir -p $base/xxx fi docker load < xxx.tar docker load <xx.tar docker images tar xvf xxx.tar.gz -C $base/xxx nohup docker-compose -f docker_xxx.yml up & docker ps -a
version: "3" services: xxx: image: "xxx" ports: - "xxx:xxx" - "xxx:xxx" volumes: - "./xxx/log:/xxx/logs" - "./xxx/data:/xxx" container_name: xxx xxx: image: "xxx" links: - xxx ports: - "xxx:xxx" depends_on: - xxx volumes: - "./xxx/log:/xxx/logs" - "./xxx:/xxx" container_name: xxx
以上是关于k8s记录-docker-compose脚本参考的主要内容,如果未能解决你的问题,请参考以下文章
Docker异常docker-compose up throw UnicodeDecodeError: 'ascii' codec can't decode byte 0x(代