docker-compose

Docker Compose vs Multi-Stage Build

泄露秘密 提交于 2021-02-18 11:05:33
问题 With this new version of Docker, Multi-Stage build gets introduced, at least I'd never heard of it before. And the question I have now is, should I use it like a standard Compose file? I used docker-compose.yaml to start containers where many images where involved, one for the web server and one for the data base. With this new multi-stage build, can I use one single Dockerfile with two FROM commands and that's it? Will this Multi-stage build eventually kill Compose (since images are smaller)

Docker Compose vs Multi-Stage Build

随声附和 提交于 2021-02-18 11:04:28
问题 With this new version of Docker, Multi-Stage build gets introduced, at least I'd never heard of it before. And the question I have now is, should I use it like a standard Compose file? I used docker-compose.yaml to start containers where many images where involved, one for the web server and one for the data base. With this new multi-stage build, can I use one single Dockerfile with two FROM commands and that's it? Will this Multi-stage build eventually kill Compose (since images are smaller)

Docker Compose and Postgres : Name does not resolve

坚强是说给别人听的谎言 提交于 2021-02-18 10:36:25
问题 In Docker, I am trying to configure Postgres, get it up and running in another container, and link it to my users service, set up with the following structure: docker-compose-dev.yml services/ users/ manage.py Dockerfile-dev entrypoint.sh project/ __init__.py config.py db/ create.sql Dockerfile docker-compose-dev.yml version: '3.7' services: users: build: context: ./services/users dockerfile: Dockerfile-dev volumes: - './services/users:/usr/src/app' ports: - 5001:5000 environment: - FLASK_APP

Share volumes between separate docker compose files

好久不见. 提交于 2021-02-18 10:09:45
问题 I am trying to allow nginx to proxy between multiple containers while also accessing the static files from those containers. To share volumes between containers created using docker compose, the following works correctly: version: '3.6' services: web: build: context: . dockerfile: ./Dockerfile image: webtest command: ./start.sh volumes: - .:/code - static-files:/static/teststaticfiles nginx: image: nginx:1.15.8-alpine ports: - "80:80" volumes: - ./nginx-config:/etc/nginx/conf.d - static-files

Share volumes between separate docker compose files

不羁的心 提交于 2021-02-18 10:09:21
问题 I am trying to allow nginx to proxy between multiple containers while also accessing the static files from those containers. To share volumes between containers created using docker compose, the following works correctly: version: '3.6' services: web: build: context: . dockerfile: ./Dockerfile image: webtest command: ./start.sh volumes: - .:/code - static-files:/static/teststaticfiles nginx: image: nginx:1.15.8-alpine ports: - "80:80" volumes: - ./nginx-config:/etc/nginx/conf.d - static-files

Apache couldn't determine servername on docker container

大兔子大兔子 提交于 2021-02-18 08:37:06
问题 I am trying to set up a customized docker container for an existing site. To do so I want to provide my own custom vhost configuration with a ServerName . But when I try to add a custom vhost configuration and restart apache I get the warning that Apache was unable to determine the global name: Could not reliably determine the server's fully qualified domain name, using 172.26.0.2. Set the 'ServerName' directive globally to suppress this message What's important is the fact that when I log

Apache couldn't determine servername on docker container

*爱你&永不变心* 提交于 2021-02-18 08:36:19
问题 I am trying to set up a customized docker container for an existing site. To do so I want to provide my own custom vhost configuration with a ServerName . But when I try to add a custom vhost configuration and restart apache I get the warning that Apache was unable to determine the global name: Could not reliably determine the server's fully qualified domain name, using 172.26.0.2. Set the 'ServerName' directive globally to suppress this message What's important is the fact that when I log

Periodic “Lost connection to MySQL server during query” after Dockerizing Flask Web App

主宰稳场 提交于 2021-02-18 06:37:40
问题 I have a Flask web app that used to run on a standalone server using the following: Flask/SQLAlchemy MariaDB uwsgi nginx On the stand alone server this application ran fine. I have since "dockerized" this application across two containers: uwsgi-nginx-flask MariaDB Every since dockerizing I occasionally get this error (entire traceback posted at the end): Lost connection to MySQL server during query The MariaDB log shows the following errors with verbose logging: 2020-05-10 18:35:32 130

Docker-compose links vs external_links

佐手、 提交于 2021-02-18 05:17:07
问题 I believe it is simple question but I still do not get it from Docker-compose documentations. What is the difference between links and external_links? I like external_links as I want to have core docker-compose and I want to extend it without overriding the core links. What exactly I have, I am trying to setup logstash which depends on the elasticsearch. Elasticsearch is in the core docker-compose and the logstash is in the depending one. So I had to define the elastic search in the depended

Docker: using container with headless Selenium Chromedriver

♀尐吖头ヾ 提交于 2021-02-17 20:57:14
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and