docker-compose

docker-compose一键部署MySQL+Redis+ActiveMQ

徘徊边缘 提交于 2020-02-04 22:19:06
Docker容器快捷高效部署应用,资源编排定义和运行多个容器,通过docker-compose.yml配置文件声明各个服务,作为一个整体来创建和启动。 MySQL+Redis+ActiveMQ是常用的开发运行环境,安装配置有些繁琐,新工程师或者新机器经常要花不少时间,为什么不试试Docker-compose一键部署? l 常见架构中的数据层: l Docker安装: https://docs.docker.com/install/linux/docker-ce/ubuntu/ https://docs.docker.com/docker-for-windows/install/ l 脚本下载: https://github.com/rickding/HelloDocker/tree/master/data ├── docker-compose.yml ├── pull.sh ├── up.sh ├── logs.sh ├── down.sh l docker-compose.yml脚本配置服务: db_admin需要连接MySQL实例,所以设置了depends_on属性。 version: '3' services: db: image: mysql:5 command: --default-authentication-plugin=mysql_native_password

Unable to add volume to image via docker-compose

心不动则不痛 提交于 2020-02-04 05:27:04
问题 I'm trying to add a volume to the mattermost/mattermost-preview docker image. The Dockerfile for this image (not controlled by me) is: # Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. # See License.txt for license information. FROM mysql:5.7 # Install ca-certificates to support TLS of Mattermost v3.5 RUN apt-get update && apt-get install -y ca-certificates # # Configure SQL # ENV MYSQL_ROOT_PASSWORD=mostest ENV MYSQL_USER=mmuser ENV MYSQL_PASSWORD=mostest ENV MYSQL_DATABASE

超详细的centos7安装redash教程

这一生的挚爱 提交于 2020-02-04 01:39:18
redash是一款目前非常流行的开源BI工具,支持的数据源丰富,图表种类多,也比较美观。但有一点不好是目前在centos上安装redash比较麻烦,下面是我亲身实践成功安装的详细步骤: 第一步 安装docker / / 安装必要的软件包 yum install - y yum - utils device - mapper - persistent - data lvm2 / / 配置仓库 yum - config - manager -- add - repo https: / / download . docker . com / linux / centos / docker - ce . repo / / 安装docker ce yum install docker - ce / / 启动docker systemctl start docker / / 安装docker - compose curl - L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose- $ ( uname - s ) - $ ( uname - m ) " - o / usr / local / bin / docker - compose / / 修改权限 chmod + x / usr /

10分钟学会docker-compose.yml

北战南征 提交于 2020-02-03 17:26:16
docker-compose.yml示例: version: '3' services: db: hostname: db image: mysql:5 command: --default-authentication-plugin=mysql_native_password ports: - 3306:3306 environment: MYSQL_DATABASE: starter MYSQL_ROOT_PASSWORD: root api: image: starter_api:latest build: . ports: - 8011:8011 depends_on: - db docker-compose.yml常用指令: 来源: 51CTO 作者: wx5b3c0a4298f7b 链接: https://blog.51cto.com/13851865/2468909

docker常用命令整理

烈酒焚心 提交于 2020-02-03 07:06:40
docker 容器列表 docker ps docker ps –a 启动容器 docker restart 容器id1 [容器id2] [...] 停止容器 docker stop [container id1] [container id2] [...] 启动容器 docker start [container id1] [container id2] [...] 镜像列表 docker images 删除镜像 docker rmi [image id1] [image id2] [...] 删除所有镜像 docker rmi $(docker images -q) 启动所有容器 docker start $(docker ps -a -q) 更新所有容器启动时自动启动 docker update --restart=always $(docker ps -q -a) 监控 docker stats 容器1 [容器2] 监控所有容器 docker stats $(docker ps -a -q) docker stats --no-stream=true $(docker ps -a -q) 进入容器内部 docker exec -it [container id] /bin/bash docker exec -it [container id] bash 查看容器日志

TiDb

一笑奈何 提交于 2020-02-03 03:28:54
源自 https://www.cnblogs.com/1ning/p/8985999.html 简介 TiDB 是 PingCAP 公司受 Google Spanner / F1 论文启发而设计的开源分布式 HTAP (Hybrid Transactional and Analytical Processing) 数据库,结合了传统的 RDBMS 和 NoSQL 的最佳特性。TiDB 兼容 MySQL,支持无限的水平扩展,具备强一致性和高可用性。TiDB 的目标是为 OLTP (Online Transactional Processing) 和 OLAP (Online Analytical Processing) 场景提供一站式的解决方案 特性 1)高度兼容 MySQL 大多数情况下,无需修改代码即可从 MySQL 轻松迁移至 TiDB,分库分表后的 MySQL 集群亦可通过 TiDB 工具进行实时迁移。 2)水平弹性扩展 通过简单地增加新节点即可实现 TiDB 的水平扩展,按需扩展吞吐或存储,轻松应对高并发、海量数据场景。 3)分布式事务 TiDB 100% 支持标准的 ACID 事务。 4)真正金融级高可用 相比于传统主从 (M-S) 复制方案,基于 Raft 的多数派选举协议可以提供金融级的 100% 数据强一致性保证,且在不丢失大多数副本的前提下,可以实现故障的自动恢复

No outside network access for Jupyter Notebook container spawned by JupyterHub

时间秒杀一切 提交于 2020-02-02 16:08:29
问题 So, here is what I am trying to achieve: A Jupyterhub server Which when accessed and you are not logged in, takes you to another web server (custom coded in Django) That web server uses OAuth to authenticate a user And a notebook container is spawned. This notebook container must be pre-populated with a token that is used by a custom library baked into the notebook Docker image to authenticate against a service. The notebook container needs to be able to communicate with the web server for

No outside network access for Jupyter Notebook container spawned by JupyterHub

。_饼干妹妹 提交于 2020-02-02 16:08:17
问题 So, here is what I am trying to achieve: A Jupyterhub server Which when accessed and you are not logged in, takes you to another web server (custom coded in Django) That web server uses OAuth to authenticate a user And a notebook container is spawned. This notebook container must be pre-populated with a token that is used by a custom library baked into the notebook Docker image to authenticate against a service. The notebook container needs to be able to communicate with the web server for

Using environment variable for volume name in docker compose

人盡茶涼 提交于 2020-02-02 04:22:31
问题 I am using docker compose version 3.3 and want to use environment variable to define the volume name. I looked at a related question, but that seems to be quite old. With long syntax supported in 3.2, is there a way to achieve that? Here is what I tried in my docker compose file: version: '3.3' services: target: image: "my-registry/my-image:${IMAGE_TAG}" volumes: - type: volume source: ${VOLUME_NAME} target: /data ports: - "${TOMCAT_PORT}:8080" volumes: ${VOLUME_NAME}: Obviously this syntax

Docker-compose - Redis at 0.0.0.0 instead of 127.0.0.1

为君一笑 提交于 2020-02-02 03:19:28
问题 I havs migrated my Rails app (local dev machine) to Docker-Compose. All is working except the Worker Rails instance (batch) cannot connect to Redis. Completed 500 Internal Server Error in 40ms (ActiveRecord: 2.3ms) Redis::CannotConnectError (Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)): In my docker-compose.yml redis: image: redis ports: - "6379:6379" batch: build: . command: bundle exec rake environment resque:work QUEUE=* volumes: - .:/app links: - db - redis