docker-compose

docker invalid characters for local volume name

时光总嘲笑我的痴心妄想 提交于 2019-12-21 11:29:09
问题 A few days ago, I installed docker on my new laptop. I've used docker for a while and know the basics pretty well. Yet, for some reason I keep bumping into the same problem and I hope someone here can help me. After installing the Docker Toolbox on my Windows 10 Home laptop, I tried to run some images that I've created using a docker-compose.yml. Since my user directory on windows has my exact name in it (C:/Users/Nick van der Meij) and that name contains spaces, I added an extra shared

Can (or should) 2 docker containers interact with each other via localhost?

若如初见. 提交于 2019-12-21 08:24:03
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Can (or should) 2 docker containers interact with each other via localhost?

自作多情 提交于 2019-12-21 08:23:54
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Run script after container entrypoint in docker-compose

无人久伴 提交于 2019-12-21 05:34:06
问题 I have a postgres:9.5.6-alpine container, and another container, named web, which has to be linked to it. I want to run a script named create_db.sh in postgres container after it has been started and docker-entrypoint.sh has been executed, in order to create a db and a user and restore a backup. My docker-compose.yml (postgres part): postgres: build: ./postgres container_name: postgres volumes: - /shared_folder/postgresql:/var/lib/postgresql ports: - "5432:5432" command: sh /home/create_db.sh

Docker Toolbox Windows - Invalid volume specification

孤街浪徒 提交于 2019-12-21 05:16:33
问题 EDIT: The problem is the COMPOSE_CONVERT_WINDOWS_PATHS environment variable isn't getting set. I tried adding it to the Dockerfile and to a .env file but its not being set. I can't set any new environment variables. Its like its building it from a cached Dockerfile. I was running docker-composer up after deleting the container, but this didn't recreate a new container, even when adding --force-recreate , it created the container from the old Dockerfile. So I ran docker build ./ instead, and

How to expose a container port outside of docker/container using docker-compose?

南笙酒味 提交于 2019-12-21 04:54:08
问题 I have a container that it has several ports, I want to have access to one of its ports ( 9001 ) outside of this docker as remote. My docker IP is: 172.17.0.1 My container IP is: 172.19.0.23 My server IP is: 192.168.1.131 I have searched about that and I found expose port keyword, and I did it but not worked. How to expose docker ports to make your containers externally accessible Reference This is my docker-compose file: version: '3' services: nginx: image: nginx:latest container_name: nginx

How to run MongoDB and Mongo-express with docker-compose?

元气小坏坏 提交于 2019-12-21 04:12:24
问题 I try to run MongoDB and Mongo-express by Docker-compose. I use following config: version: '3' services: mongo: image: mongo environment: - MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER} - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD} - MONGO_INITDB_DATABASE=project mongo-express: image: mongo-express environment: - ME_CONFIG_MONGODB_SERVER=mongo - ME_CONFIG_MONGODB_PORT=27017 - ME_CONFIG_MONGODB_ENABLE_ADMIN=false - ME_CONFIG_MONGODB_AUTH_DATABASE=admin - ME_CONFIG_MONGODB_AUTH_USERNAME=$

How do you define a network in a version 2 docker-compose definition file?

本秂侑毒 提交于 2019-12-21 03:58:18
问题 The documentation about networking is currently very vague on this ― how do you accomplish a docker-compose.yml that creates a virtual network, letting the services (containers) defined by it communicate on that network? Goal in this scenario being not relying on a pre-defined network, for an ensemble of containers defined for docker-compose. Rather have the network definition self-contained in the docker-compose definition file. With a pre-defined network, this below would work if the

Why does docker-compose build not reflect my django code changes?

 ̄綄美尐妖づ 提交于 2019-12-21 01:57:21
问题 So I have a Django project I am deploying with docker-compose. There is a simple error in my profile_form.html template with line 3 highlighted. {% include "header.html" %} {% load i18n %} {% load url from future %} 'future' is not a registered tag library So I simple delete the load url line, save profile_form.html, and then try to build a new container reflecting the code change. docker-compose build docker-compose start This did not resolve the issue and I get the same error. I went into

Cron and Crontab files not executed in Docker

牧云@^-^@ 提交于 2019-12-20 23:21:12
问题 I have this simple Dockerfile for testing, but this is also same in my LEMP stack in a PHP image: cron jobs simply not being executed in Docker. This is my testing Dockerfile: FROM debian:latest MAINTAINER XY <info@domain.com> LABEL Description="Cron" Vendor="Istvan Lantos" Version="1.0" RUN apt-get -y update && apt-get -y dist-upgrade \ && apt-get -y install \ cron \ rsyslog \ vim RUN rm -rf /var/lib/apt/lists/* #cron fixes RUN touch /etc/crontab /etc/cron.d/* /var/spool/cron/crontabs/*