# https://docs.docker.com/compose/compose-file/05-services/ services: # https://hub.docker.com/_/golang go_kit: ports: - 0:80 - 0:22 image: golang:1.26.0 command: sleep infinity working_dir: /workspace volumes: - .:/workspace - ~/.ssh:/root/.ssh - go:/go gk_mysql: ports: - 0:3306 image: mysql:8.0.37 restart: unless-stopped # NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password # (this is just an example, not intended to be a production configuration) command: --default-authentication-plugin=mysql_native_password environment: MYSQL_ROOT_PASSWORD: root gk_redis: ports: - 0:6379 # 默认密码为空 image: redis:7.2.5 volumes: go: external: true