wget 或 git clone
docker build -t jumpserver:v1 . #构建镜像 docker images
vim jumpserver-dockercompose.yml
version: '3' networks: jumpserver: services: mysql: image: mysql:5.7 container_name: jms__mysql restart: always version: '3' networks: jumpserver: services: mysql: image: mysql:5.7 version: '3' networks: jumpserver: services: mysql: image: mysql:5.7 container_name: jms__mysql restart: always tty: true environment: MYSQL_ROOT_PASSWORD: 237356573 MYSQL_DATABASE: jumpserver command: --character-set-server=utf8 volumes: - ./db-data:/var/lib/mysql ports: - 3306:3306 networks: - jumpserver redis: image: redis:alpine container_name: jms_redis restart: always tty: true volumes: - ./redis-data:/data networks: - jumpserver jumpserver: image: jumpserver:v1 container_name: jumpserver restart: always tty: true environment: SECRET_KEY: "fdoGcDgcYbbJBC0kaUJ6p4JvGH12Vmft9eAEbf04sJzx62MGXg" BOOTSTRAP_TOKEN: "cfqsR7wnoOAFUjZC" DB_HOST: "mysql" DB_PORT: 3306 DB_USER: "root" DB_PASSWORD: 237356573 DB_NAME: "jumpserver" REDIS_HOST: "redis" ports: - 8080:8080 - 222:222 depends_on: - mysql - redis networks: - jumpserver