docker-compose

Unable to connect to MYSQL from Docker Instance

走远了吗. 提交于 2019-12-30 10:37:43
问题 I'm new to Docker and pulled the mysql from the docker hub using following command docker pull mysql Now, started mysql instance using following commands. docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server:latest Unable to find image 'mysql/mysql-server:latest' locally latest: Pulling from mysql/mysql-server e64f6e679e1a: Pull complete 799d60100a25: Pull complete 85ce9d0534d0: Pull complete d3565df0a804: Pull complete Digest: sha256

Unable to connect to MYSQL from Docker Instance

痴心易碎 提交于 2019-12-30 10:36:57
问题 I'm new to Docker and pulled the mysql from the docker hub using following command docker pull mysql Now, started mysql instance using following commands. docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server:latest Unable to find image 'mysql/mysql-server:latest' locally latest: Pulling from mysql/mysql-server e64f6e679e1a: Pull complete 799d60100a25: Pull complete 85ce9d0534d0: Pull complete d3565df0a804: Pull complete Digest: sha256

Docker - Rails app cannot connect to linked Postgres container (doesn't seem to be running)

旧城冷巷雨未停 提交于 2019-12-30 09:42:35
问题 I've been following this guide of how to set up a Rails Development Environment using Docker: Setting Up A Rails Development Environment Using Docker. I've hit a few snags along the way, but I've managed to get through most of them up until the step of running Rails migration. Running the command docker-compose run web rake db:migrate yields the following result: rake aborted! PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "localhost" (::1)

How to fix docker: Got permission denied issue

▼魔方 西西 提交于 2019-12-29 10:04:16
问题 I installed Docker in my machine where I have Ubuntu OS. After than I installed docker, when I run sudo docker run hello-world All it's ok, but I want to hide the word sudo to make more short the command. If I write the command without the word sudo docker run hello-world That display the following: docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run

Django connection to postgres by docker-compose

a 夏天 提交于 2019-12-29 08:33:14
问题 My django project cannot connect to postgres database container. What I should to do? It crashes on commands python manage.py collectstatic --noinput && python manage.py makemigrations blog && python manage.py migrate . I know docker run command creates a new container but I have more commands as one by bash in docker-compose.yml. It should works, shouldn't it? my Dockerfile : FROM python:3.6-alpine MAINTAINER Name <name@domain> ENV PYTHONUNBUFFERED 1 ENV INSTALL_PATH /heckblog RUN mkdir -p

Docker mysql cant connect to container

霸气de小男生 提交于 2019-12-29 04:45:08
问题 I've got docker-compose file for creating mysql image and expose port to 3306, but when I try to install CMS, it gives me error that it can't connect to Database. I try to scan port 3306 and it's showing me that it's open so mysql is running. Why the two of docker containers can't see each other ? Here is my docker-compose file: phpfpm: restart: always extends: file: php-fpm-5.6.yml service: phpfpm links: - db:db nginx: restart: always image: nginx ports: - "8000:80" links: - phpfpm:phpfpm

How can I use IdentityServer4 from inside and outside a docker machine?

我的梦境 提交于 2019-12-29 03:20:06
问题 I want to be able to authenticate against an Identity Server (STS) from outside and inside a docker machine. I am having trouble with setting the correct authority that works both inside and outside the container. If I set the authority to the internal name mcoidentityserver:5000 then the API can authenticate but the client cannot get a token as the client lies outside of the docker network. If I set the authority to the external name localhost:5000 then the client can get a token but the API

Docker-compose and pdb

青春壹個敷衍的年華 提交于 2019-12-29 02:45:56
问题 I see that I'm not the first one to ask the question but there was no clear answer to this: How to use pdb with docker-composer in Python development? When you ask uncle Google about django docker you get awesome docker-composer examples and tutorials and I have an environment working - I can run docker-compose up and I have a neat developer environment but the PDB is not working (which is very sad). I can settle with running docker-compose run my-awesome-app python app.py 0.0.0.0:8000 but

Centos 7 Docker、docker-compose、Registrator、Consul、Consul Template和Nginx实现高可扩展的Web框架

蹲街弑〆低调 提交于 2019-12-29 01:43:51
安装所需软件 Docker Docker-compose 配置docker-compose.yml文件内容如下: #load balancer will automatically update the config using consul-template lb: image: yeasy/nginx-consul-template:latest hostname: lb volumes: - /usr/soft/consul/logapi.conf:/etc/consul-templates/nginx.conf links: - consulserver:consul ports: - "80:80" consulserver: image: gliderlabs/consul-server:latest hostname: consulserver ports: - "8300:8300" - "8301:8301" - "8301:8301/udp" - "192.168.190.131:8302:8302" - "192.168.190.131:8302:8302/udp" - "192.168.190.131:8400:8400" - "192.168.190.131:8500:8500" - "53:53/udp" - "53:53" command: -data

Docker: where is docker volume located for this compose file

孤街醉人 提交于 2019-12-28 13:43:52
问题 I was setting up some materials for a trainning, when I came around this sample compose file: https://github.com/dockersamples/example-voting-app/blob/master/docker-compose.yml and I couldn't find out how this volume is mounted, on lines 48 and 49 of the file: volumes: db-data: Can someone explain me where is this volume on the host? Couldn't find it and I wouldn't like to keep any postgresql data dangling around after the containers are gone. Similar thing happens to the networks: networks: