docker-compose

centos7 安装docker-compose及加速

为君一笑 提交于 2019-12-10 10:46:42
首先是官方安装(一般会因为网络原因失败) https://docs.docker.com/compose/install/ pip3安装 yum install python3-pip pip3 install docker-compose sudo chmod +x /usr/local/bin/docker-compose docker-compose -v 加速 镜像拉取一直报错: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 解决方法: vi /etc/docker/daemon.json { "registry-mirrors": ["https://registry.docker-cn.com"] } 重启docker systemctl daemon-reload systemctl restart docker 访问 https://www.daocloud.io/mirror 来源: CSDN 作者: Supernnan 链接: https://blog.csdn.net

How to setup multi-host networking with docker swarm on multiple remote machines

99封情书 提交于 2019-12-10 10:28:26
问题 Before asking this question I have read quiet of articles and stackoverflow questions but I couldn't get the right answer for my setup(perhaps it is already answered). Here is the architecture I have been struggling to get it to work. I have three physical machines and I would like to setup the Docker swarm with multi-host networking so that I can run docker-compose. For example: Machine 1(Docker Swarm Manager and Contains Consoul)(192.168.5.11) Machine 2(Docker Swarm Node)(192.168.5.12)

How to use Deployer with Docker (Laradock)

倖福魔咒の 提交于 2019-12-10 10:27:11
问题 I created a fresh Digital Ocean server with Docker on it (using Laradock) and got my Laravel website working well. Now I want to automate my deployments using Deployer. I think my only problem is that I can't get Deployer to run docker exec -it $(docker-compose ps -q php-fpm) bash; , which is the command I successfully manually use to enter the appropriate Docker container (after using SSH to connect from my local machine to the Digital Ocean server). When Deployer tries to run it, I get this

Configure PyCharm interpreter with docker-compose inside Vagrant

天涯浪子 提交于 2019-12-10 10:26:45
问题 I have a basic vagrant box, with docker and docker-compose running in it. The docker-compose.yaml has a web service like this: web: restart: always build: . ports: - "5000:5000" expose: - "5000" links: - postgres:postgres volumes: - .:/usr/src/app/ env_file: .env command: python manage.py runserver #below the postgres service is defined Vagrantfile: Vagrant.configure(2) do |config| config.vm.box = "phusion/ubuntu-14.04-amd64" config.vm.network "private_network", ip: "192.168.33.69" config.vm

Running composer install in docker container

↘锁芯ラ 提交于 2019-12-10 10:19:41
问题 I have a docker-compose.yml script which looks like this: version: '2' services: php: build: ./docker/php volumes: - .:/var/www/website The DockerFile located in ./docker/php looks like this: FROM php:fpm RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" RUN mv composer.phar /usr/local/bin/composer RUN composer update -d /var/www/website Eventho this always fails with the error [RuntimeException]

docker 私有registry harbor安装

﹥>﹥吖頭↗ 提交于 2019-12-10 10:10:51
一,harbor安装: 参考: Installation and Configuration Guide 1, 安装docker 2,安装docker compose sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 3,下载二进制文件: wget https://storage.googleapis.com/harbor-releases/harbor-offline-installer-v1.5.2.tgz 4,解压缩: sudo tar xf harbor-offline-installer-v1.5.2.tgz -C /usr/local/ 5,编辑:/usr/local/harbor/harbor.cfg hostname :自己机器的名字(用hostname可以得到),或者是IP地址。 ui_url_protocol

Passing Different Arguments When Running Docker Image Multiple Times

余生长醉 提交于 2019-12-10 09:57:14
问题 I need to give an argument while running Docker Image which will be a number from 0-3. Dockerfile has the following: WORKDIR "mydir/build" CMD ./maker oneapp > /artifacts/oneapp_$1.log ; ./maker twoapp > /artifacts/twoapp_$1.log ; ./maker -j13 threeapp > /artifacts/threeapp_$1.log I will be running the same Docker Image multiple times so I need logs to be saved in /artifacts appended with _0, _1, _2, _3, as appropriate. I tried keeping this in Docker file but don't want to pass this full line

How to mount docker volume into my docker project using compose?

泄露秘密 提交于 2019-12-10 09:11:08
问题 I have a Maven project. I'm running my Maven builds inside Docker. But the problem with that is it downloads all of the Maven dependencies every time I run it and it does not cache any of those Maven downloads. I found some work arounds for that, where you mount your local .m2 folder into Docker container. But this will make the builds depend on local setup. What I would like to do is to create a volume (long live) and link/mount that volume to .m2 folder inside Docker. That way when I run

Docker containers: how do they work together?

前提是你 提交于 2019-12-10 07:16:04
问题 I have started working with docker and built a working example as seen in https://codeable.io/wordpress-developers-intro-docker. I need a quite small footprint of the docker containers since the deployment will be on an emebedded system. But I have no clue about how this fits together. There are two Dockerfiles, one for Nginx: FROM nginx:1.9-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf The nginx.conf is defined as: server { server_name _; listen 80 default_server; root /var/www/html;

Deployment with docker-compose to Azure using CLI gives timeout when visiting agent page

梦想的初衷 提交于 2019-12-10 04:34:14
问题 I have docker-compose file: version: "3" services: app2: image: kamilwit/dockerdocker_app2 container_name: app2 build: context: ./app2 volumes: - app2data:/data environment: - LOGGING_LOG-FILES-PATH=/opt/tomcat/logs ports: - "8000:8080" app: image: kamilwit/dockerdocker_app container_name: app build: context: ./app volumes: - app1data:/data environment: - LOGGING_LOG-FILES-PATH=/opt/tomcat/logs ports: - "8001:8080" volumes: app1data: app2data: I followed the instructions from https://docs