docker-compose

docker dnmp安装使用

旧时模样 提交于 2020-04-05 15:40:25
本次介绍会省去很多 docker 的基础知识,如有需要,请自行百度(Google)。只会介绍一些基本的概念和具体的操作过程。 docker 基础的参考: https://blog.csdn.net/S_gy_Ze... 参考书籍: https://yeasy.gitbooks.io/doc... (可以看前几章系统了解 Docker) 官网文档: https://docs.docker.com/ 官方仓库: https://hub.docker.com/ docker-compose compose 项目是 Docker 官方的开源项目,负责实现对 Docker 容器集群的快速编排。 —— 《Dokcer 从入门到实践》 它的主要作用是运行多个 Docker 容器的应用。比如: LNMP —— 我们使用 Docker 来安装, Nginx 、 PHP 、 MySQL 都单独启动一个容器( docker ps 查看容器的运行详情),假如电脑关机了,你需要重启 LNMP 环境,你需要将其逐个运行。如下命令: # 启动 Nginx $ docker run --name runoob-nginx-test -p 8081:80 -d nginx # 启动php $ docker run --name myphp-fpm -v ~/nginx/www:/www -d php:5.6-fpm

How to stop all containers when one container stops with docker-compose?

 ̄綄美尐妖づ 提交于 2020-04-04 04:57:44
问题 Up until recently, when one was doing docker-compose up for a bunch of containers and one of the started containers stopped, all of the containers were stopped. This is not the case anymore since https://github.com/docker/compose/issues/741 and this is a really annoying for us: We use docker-compose to run selenium tests which means starting application server, starting selenium hub + nodes, starting tests driver, then exiting when tests driver stops. Is there a way to get back old behaviour?

ubuntu18.04在线安装docker、nvidia-docker2与docker-compos

送分小仙女□ 提交于 2020-03-31 16:07:53
说明 由于项目测试需要,须安装如下版本的docker组建: Docker:18.09.6 nvidia-docker2:18.09.6 部署 Docker 主要步骤如下: (1)安装基础包 apt-get install -y apt-transport-https ca-certificates curl software-properties-common (2)添加 apt-key curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add (3)添加阿里云仓库 add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" (4)查看当前库对应的 docker 可用的版本 apt-cache madison docker-ce (5)安装 Docker:18.09.6 apt-get install -y docker-ce=5:18.09.6~3-0~ubuntu-bionic docker-ce-cli=5:18.09.6~3-0~ubuntu-bionic (6)查看 docker 版本 docker

sentry使用docker-compose部署

佐手、 提交于 2020-03-29 11:41:31
sentry功能   Sentry是一个 实时事件的日志聚合平台 。它 专门监测错误并提取所有有用信息用于分析,不再麻烦地依赖用户反馈来定位问题 。 What’s Sentry?   Sentry fundamentally is a service that helps you monitor and fix crashes in realtime . The server is in Python, but it contains a full API for sending events from any language, in any application。 环境信息 centos7.x docker-ce Version: 18.09.0 docker-compose version 1.25.4 https://sentry.io https://github.com/getsentry/sentry https://github.com/docker-library/docs/tree/master/sentry sentry9.1.2(优化版) https://github.com/getsentry/onpremise/releases/tag/9.1.2 https://gitee.com/m0p/onpremise/repository/archive/9

Traefik returns “”backend not found" error

99封情书 提交于 2020-03-28 06:40:12
问题 I have the following Docker compose file: version: "3.7" services: shinyproxy: build: /home/shinyproxy deploy: replicas: 3 user: root:root hostname: shinyproxy image: shinyproxy-example labels: - traefik.enable=true - traefik.backend.loadbalancer.swarm=true - traefik.backend=shinyproxy - traefik.frontend.rule=Host:analytics.data-mastery.com; - traefik.port=5000 - traefik.docker.network=sp-example-net keycloak: image: jboss/keycloak labels: - traefik.enable=true - traefik.backend.loadbalancer

Harbor镜像仓库搭建

时光毁灭记忆、已成空白 提交于 2020-03-27 23:01:48
一、Harbor安装环境要求 硬件环境: 1)CPU 2核以上,最好4核以上 2)内存4G以上,最好8G以上 3)硬盘空间至少40G,最好160G以上 软件环境: 1)docker v17.06以上版本 2)docker-compose v1.18.0以上版本 3)Openssl 更新到最新版(一般情况下,这个可忽略) 说明:本例中服务器操作系统为CentOS7.4 二、Harbor服务器搭建 1、下载Harbor安装文件 从GitHub上 https://github.com/goharbor/harbor/releases 查看当前可用的harbor版本,一般选择最新稳定版,目前就是这个: 下载该安装包到系统目录中,如下: [root@localhost ~]# mkdir -p /home/temp/ [root@localhost ~]# cd /home/temp/ [root@localhost temp]# wget https://github.com/goharbor/harbor/releases/download/v1.10.1/harbor-offline-installer-v1.10.1.tgz 下载速度可能会有点慢,耐心等待下载完成。 2、解压安装文件 [root@localhost temp]# tar -zxf harbor-offline

Scaling with docker-composer and appending a number to the hostname?

≡放荡痞女 提交于 2020-03-26 06:40:48
问题 I've got a docker-compose.yml : master: build: . slave: image: master hostname: slave command: run_slave How can I make docker-compose scale slave=5 generate machines with unique hostnames? ...e.g. something like this: slave1 slave2 slave3 slave4 slave5 回答1: There is no way to set the hostname to that value. If you need a unique identifier, I would use the unique container id, which you can get by running $(hostname) . 回答2: The accepted answer is correct, there is no way to set this using one

Docker版zabbix

时间秒杀一切 提交于 2020-03-26 02:57:50
1. docker-compose docker-compose :容器自带的编排工作,可以通过yaml编排文件,将容器要启动的命令写入文件,然后再利用docker-compose run file.yaml文件来直接启动,同时启动多个容器,方便应用服务的移植、共享。 2. 部署zabbix服务 部署zabbix服务,然后利用docker-compose启动。 1> 上传压缩包,解压 [root@node ~]# cd /opt/ [root@node opt]# ls rh zabbix-agent.tar.gz zabbix-server.tar.gz [root@node opt]# tar xf zabbix-server.tar.gz [root@node opt]# ls cmp_mariadb cmp_zabbix rh zabbix-agent.tar.gz zabbix-server.tar.gz 2> 启动数据库 [root@node cmp_mariadb]# docker load -i mariadb-latest.tar #导入镜像 [root@node cmp_mariadb]# docker images mariadb latest 901583bfdf5a 5 months ago 367MB 启用编排文件文件名必须为docker-compose

docker compose up gving error as I need to stop mysql service ERROR: for demo_db_1 Cannot start

一个人想着一个人 提交于 2020-03-25 19:21:30
问题 I have spring boot app with below Dockerfile FROM openjdk:8-jdk-alpine EXPOSE 8080 ARG JAR_FILE=target/demo-0.0.1-SNAPSHOT.jar ADD ${JAR_FILE} demo.jar ENTRYPOINT ["java","-jar","/demo.jar"] I can able to build docker image successfully and this below is my docker-compose # Docker Compose file Reference (https://docs.docker.com/compose/compose-file/) version: '3.7' # Define services services: # App backend service app-server: # Configuration for building the docker image for the backend

Docker volume doesn't keep data after turned docker-compose down

心已入冬 提交于 2020-03-25 19:00:24
问题 I am using docker compose to combine 2 images (tomcat with my app and database - postgres). My compose file looks like this : version: '3' services: tomcat: build: ./tomcat-img ports: - "8080:8080" depends_on: - "db" db: build: ./db-img volumes: - db-data:/var/lib/postgres/data ports: - "5433:5432" volumes: db-data: and here is dockerfile for database image: FROM postgres:9.5-alpine ENV POSTGRES_DB mydb ENV POSTGRES_USER xxxx ENV POSTGRES_PASSWORD xxxx COPY init-db.sql /docker-entrypoint