Docker MySQL

start mysql8 in docker,use ~/mysql/data to persist data docker-compose.yml version: '3.1' services: mysql: image: mysql:8 container_name: mysql command: --default-authentication-plugin=mysql_native_password volumes: - mysql-data:/var/lib/mysql ports: - 3306:3306 restart: always environment: MYSQL_ROOT_PASSWORD: {your password} TZ: Asia/Shanghai network_mode: bridge volumes: mysql-data: external: true

March 24, 2021 · 1 min · Steven Jiang

Docker PgAdmin4

start pgadmin4 5.1 in docker docker-compose.yml version: '3.1' services: pgadmin4: image: dpage/pgadmin4:5.1 ports: - 8081:80 restart: always environment: PGADMIN_DEFAULT_EMAIL: {email} PGADMIN_DEFAULT_PASSWORD: {password}

March 24, 2021 · 1 min · Steven Jiang

Docker PostgreSQL

start postgresql 13 and pgadmin4 5.1 in docker,use ~/postgresql/data to persist data docker-compose.yml version: '3.1' services: postgresql: image: postgres:13 volumes: - ~/postgresql/data:/var/lib/postgresql/data ports: - 5432:5432 restart: always environment: POSTGRES_PASSWORD: {password} pgadmin4: image: dpage/pgadmin4:5.1 ports: - 80:80 restart: always environment: PGADMIN_DEFAULT_EMAIL: {email} PGADMIN_DEFAULT_PASSWORD: {password}

March 24, 2021 · 1 min · Steven Jiang

Docker RabbitMQ

start rabbitmq 3.8.14 and management plugin in docker docker-compose.yml version: '3.1' services: rabbitmq: image: rabbitmq:3.8.14-management ports: - 15672:15672 - 5672:5672 restart: always environment: RABBITMQ_DEFAULT_USER: {username} RABBITMQ_DEFAULT_PASS: {password}

March 24, 2021 · 1 min · Steven Jiang

Docker Redis

start redis 6.2 in docker,use ~/redis/data to persist data docker-compose.yml version: '3.1' services: redis: image: redis:latest container_name: redis command: redis-server --requirepass {password} --appendonly yes #command: redis-server /usr/local/etc/redis/redis.conf volumes: - ~/redis/redis.conf:/usr/local/etc/redis/redis.conf - redis-data:/data ports: - 6379:6379 restart: always network_mode: bridge volumes: redis-data: external: true redis.conf requirepass {password} appendonly yes daemonize no

March 24, 2021 · 1 min · Steven Jiang

Docker Compose

Install Docker Compose V2 in CentOS7.4 Docker Engine Installed cmd mkdir -p ~/.docker/cli-plugins/ curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose chmod +x ~/.docker/cli-plugins/docker-compose To install Docker Compose for all users on your system, replace ~/.docker/cli-plugins with /usr/local/lib/docker/cli-plugins docker compose version 新版本Docker自带Docker Compose V2

March 24, 2021 · 1 min · Steven Jiang

Docker

Install # use aliyun mirror curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun mirrors { "registry-mirrors": [ "https://dockerproxy.com", "https://registry.docker-cn.com" ] } # registry sudo docker run -d -p 5000:5000 --restart always --name registry -v docker-registry:/var/lib/registry registry:2 # nexus oss3 sudo docker volume create nexus-data sudo docker run -d --restart always -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3 issue 在docker容器内部执行 jmap命令报错 Operation not permitted # Docker 自1.10版本开始加入的安全特性。类似于 jmap 这些 JDK 工具依赖于 Linux 的 PTRACE_ATTACH,而是Docker自1....

March 17, 2021 · 1 min · Steven Jiang