zoukankan      html  css  js  c++  java
  • docker命令

    docker ps

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    5753236c11fc puckel/docker-airflow:1.10.1 "/entrypoint.sh sc..." 20 hours ago Up 20 hours 5555/tcp, 8080/tcp, 8793/tcp zhepeng_airflow_scheduler_1
    0597b0b65c75 puckel/docker-airflow:1.10.1 "/entrypoint.sh we..." 20 hours ago Up 20 hours 5555/tcp, 8793/tcp, 10.52.174.112:18080->8080/tcp zhepeng_airflow_webserver_1
    9673ec2a3f35 postgres:11 "docker-entrypoint..." 20 hours ago Up 20 hours 5432/tcp zhepeng_postgres_1
    12363fd44eac mastak/airflow_operator_stats "python3 /app/airf..." 20 hours ago Up 20 hours 10.52.174.112:18000->8000/tcp zhepeng_airflow-exporter_1
    cea1c8f01dd1 redis:3.2.7 "docker-entrypoint..." 20 hours ago Up 20 hours 6379/tcp zhepeng_redis_1

    docker inspect cea1c8f01dd1  #看docker的详细信息,端口映射,所在位置,磁盘映射等.

    docker search image-name--搜索你想要的镜像

    docker run xxx--相当于创建和运行一个容器

    docker ps--查看正在活动着的容器

    docker ps -a --查看所有的容器(包括已终止的容器)

    docker images--查看本地仓库里的镜像

    docker rm container-name--删除容器(删除之前先stop容器)

    docker rm -f container-name  #强制删除正在运行的容器

    docker rmi -f 镜像id   #强制删除本地镜像

    docker stop 62b1d7f2410f  #停止运行

    Stop all running docker container, by using docker stop $(docker ps -aq)

    Remove all docker containers, by using docker rm $(docker ps -aq)

    Remove all docker images, by using docker rmi $(docker images -q)

    启用和停止docker服务:

    systemctl stop docker

    systemctl enable docker

    docker ps
    docker exec -it d516f425702d bash

    docker-compose -f uslave.yml stop uslave1
    docker-compose -f uslave.yml up -d
    docker-compose -f jumpserver.yml ps

    root@oride-ops:/data/yml/jumpserver # vi jumpserver.yml

    version: "3"

    services:

    percona:
    image: percona
    container_name: jumpserver-percona
    hostname: percona
    volumes:
    - /data/run/percona/mysql:/mysql
    ports:
    - 389:389
    - 13305:3306
    environment:
    MYSQL_ROOT_PASSWORD:xxx
    MYSQL_DATABASE: jumpserver
    MYSQL_USER: jumpserver
    MYSQL_PASSWORD: xx
    dns:
    - 10.52.255.1
    - 10.52.255.2
    networks:
    - jumpserver

    zabbix:
    image: zabbix
    container_name: zabbix
    hostname: zabbix
    volumes:
    - /data/run/zabbix/usr_lib_zabbix:/usr/lib/zabbix
    - /data/run/zabbix/etc_zabbix:/etc/zabbix
    ports:
    - 89:80
    networks:
    - jumpserver

    gpe:
    image: gpe
    container_name: gpe
    hostname: gpe
    volumes:
    - /data/run/prometheus:/data
    ports:
    - 3000:3000
    - 9090:9090
    networks:
    - jumpserver

    jumpserver:
    image: jms
    container_name: jumpserver
    hostname: jms
    volumes:
    - /data/run/jms_all/mysql:/var/lib/mysql
    - /data/run/jms_all/opt:/opt
    ports:
    - 2222:2222
    - 5000:5000
    - 8080:8080
    - 8081:8081
    environment:
    - SECRET_KEY=xxx
    - BOOTSTRAP_TOKEN=xxx
    - DB_HOST=percona
    - DB_PORT=3306
    - DB_USER=jumpserver
    - DB_PASSWORD=xxx
    - DB_NAME=jumpserver
    - REDIS_HOST=127.0.0.1
    - REDIS_PORT=6379
    depends_on:
    - percona
    networks:
    - jumpserver

    networks:
    jumpserver:

  • 相关阅读:
    如何用js解网页中间内容的高度自适应
    常见Js获取高宽度的方法
    CSS3 转换 transform
    CSS3 过渡 transition
    CSS3 动画 animation
    当页面内容不够的时候,如何让footer一直固定底部显示
    如何用js判断是否为手机访问
    用css解决table文字溢出控制td显示字数
    jquery实现全选和反选功能
    JS中filter的用法
  • 原文地址:https://www.cnblogs.com/hongfeng2019/p/11428401.html
Copyright © 2011-2022 走看看