docker run -d --name gitlab-runner --restart always \
  -v /var/local/gitlab-runner/config:/etc/gitlab-runner \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/local/docker/cicd:/home/docker/cicd \
  -v /var/local/maven/repository:/home/maven/repository \
  gitlab/gitlab-runner:latest



//创建mysql
docker run -d \
  --name mysql \
  --restart always \
  -p 13306:3306 \
  -e MYSQL_ROOT_PASSWORD=K9p@rS32qL7z \
  -e TZ=Asia/Shanghai \
  -v /usr/local/docker/mysql/data:/var/lib/mysql \
  -v /usr/local/docker/mysql/conf:/etc/mysql/conf.d \
  mysql:8.0 \
  --lower_case_table_names=1


  //创建redis
 docker run -d \
     --name redis \
     --restart always \
     -p 16379:6379 \
     -v /usr/local/docker/redis/data:/data \
     -v /usr/local/docker/redis/conf:/usr/local/etc/redis \
     redis:latest \
     redis-server /usr/local/etc/redis/redis.conf --requirepass "e4ea0caebfd2"

    //创建nginx
    docker run -d \
      --name nginx \
      --env TZ=Asia/Shanghai \
      -p 8000:80 \
      -p 7443:443 \
      -v /usr/local/docker/nginx/cert:/etc/nginx/cert \
      -v /usr/local/docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \
      -v /usr/local/docker/nginx/html:/etc/nginx/html \
      -v /usr/local/docker/nginx/log:/var/log/nginx \
      -v /usr/local/docker/nginx/upload:/var/upload/files \
      --privileged \
      --network host \
      nginx
      //创建java
      docker run -d \
              --name java \
              --restart always \
              -p 8880:8080 \
              -v /var/local/docker/java/data:/java \
              -v /var/local/docker/java/logs:/logs \
              -v /var/fs/cgroup:/sys/fs/cgroup:ro  \
              -e TZ=Asia/Shanghai \
              -e JAVA_OPTS="-Xms512m -Xmx800m \
                -XX:+UseContainerSupport \
                -XX:MaxMetaspaceSize=256m \
                -XX:+HeapDumpOnOutOfMemoryError \
                -XX:HeapDumpPath=/var/log/java-app/heapdump.hprof \
                -Dlogging.file.path=/var/log/java-app \
                -Dfile.encoding=UTF-8 \
                -Dprofile=dev" \
                -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005  \
              --health-interval=30s \
              --health-timeout=5s \
              --health-retries=3 \
              bellsoft/liberica-openjdk-debian:17.0.11-cds \
              java $JAVA_OPTS -Djdk.internal.platform.CgroupMetrics.enabled=false -jar /java/ruoyi-admin.jar


        //es

docker run -d \
  --name es \
  --restart always \
  -p 19200:9200 \
  -p 19300:9300 \
  -e "discovery.type=single-node" \
  -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
  -v /usr/local/docker/elasticsearch/data:/usr/share/elasticsearch/data \
  elasticsearch:7.17.0


docker run -d \
  --name minio \
  -p 9000:9000 \
  -p 9001:9001 \
  -e TZ=Asia/Shanghai \
  -e MINIO_ROOT_USER=wzj \
  -e MINIO_ROOT_PASSWORD=wzj123456 \
  -e MINIO_COMPRESS=off \
  -e MINIO_COMPRESS_EXTENSIONS="" \
  -e MINIO_COMPRESS_MIME_TYPES="" \
  -v /usr/local/docker/minio/data:/data \
  -v /usr/local/docker/minio/config:/root/.minio/ \
  --privileged \
  minio/minio:RELEASE.2023-04-13T03-08-07Z \
  server --address ':9000' --console-address ':9001' /data

rocket-mq
# 创建自定义网络
docker network create rocketmq-single-network


docker run -d --name rocketmq-namesrv \
  --network rocketmq-single-network \
  -p 9876:9876 \
  -v /usr/local/docker/rocketmq/namesrv/logs:/root/logs \
  -v /usr/local/docker/rocketmq/namesrv/store:/root/store \
  --restart=always \
  apache/rocketmq:4.9.4 \
  sh mqnamesrv

docker run -d \
  --name rocketmq-broker \
  --network rocketmq-single-network \
  -p 10911:10911 \
  -p 10909:10909 \
  -v /usr/local/docker/rocketmq/broker/logs:/root/logs \
  -v /usr/local/docker/rocketmq/broker/store:/root/store \
  -v /usr/local/docker/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-4.9.4/conf/broker.conf \
  -e "NAMESRV_ADDR=rocketmq-namesrv:9876" \
  -e "ROCKETMQ_HOME=/home/rocketmq/rocketmq-4.9.4" \
  --restart=always \
  apache/rocketmq:4.9.4 \
  sh mqbroker -c /home/rocketmq/rocketmq-4.9.4/conf/broker.conf


docker run -d \
  --name rocketmq-console \
  --network rocketmq-single-network \
  -p 8081:8080 \
  -e "JAVA_OPTS=-Drocketmq.namesrv.addr=rocketmq-namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" \
  --restart=always \
  styletang/rocketmq-console-ng:latest
