I'm using docker-compose for terramoney.
Here is docker-compose.yml file.
version: "3"
services:
terrad:
image: terramoney/localterra-core:0.5.18
volumes:
- ./config:/root/.terra/config
networks:
- terra
ports:
- "26657:26657"
- "1317:1317"
- "9090:9090"
- "9091:9091"
command: terrad start
oracle:
image: terramoney/pseudo-feeder:0.5.6
depends_on:
- terrad
volumes:
- ./config/config.toml:/app/config.toml
networks:
- terra
environment:
TESTNET_LCD_URL: http://terrad:1317
command: start
postgres:
image: postgres:12
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- terra
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
# redis:
# image: redis:latest
# networks:
# - terra
# ports:
# - "6379:6379"
fcd-collector:
image: terramoney/fcd:1.0.14
depends_on:
- terrad
- postgres
volumes:
- ./logs:/app/logs
networks:
- terra
env_file: fcd.env
command: collector
restart: unless-stopped
fcd-api:
image: terramoney/fcd:1.0.14
depends_on:
- terrad
- postgres
volumes:
- ./logs:/app/logs
networks:
- terra
ports:
- 3060:3060
env_file: fcd.env
command: start
networks:
terra:
driver: bridge
When I run sudo docker-compose up, I got this error.
Starting localterra_terrad_1 ... Starting localterra_postgres_1 ...
error
ERROR: for localterra_postgres_1 Cannot start service postgres: OCI
runtime creStarting localterra_terrad_1 ... error
2d5e1c2ce6c114821010c6: unknown
ERROR: for localterra_terrad_1 Cannot start service terrad: OCI
runtime create failed: container with id exists:
0d03712d982f9b6f1d67c36735f4aefddb874e65958965e1bca54a782f525c6e:
unknown
ERROR: for postgres Cannot start service postgres: OCI runtime create
failed: container with id exists:
ea889e63356e0d77d5196b2c73d1696089944fcbab2d5e1c2ce6c114821010c6:
unknown
ERROR: for terrad Cannot start service terrad: OCI runtime create
failed: container with id exists:
0d03712d982f9b6f1d67c36735f4aefddb874e65958965e1bca54a782f525c6e:
unknown ERROR: Encountered errors while bringing up the project.
If anyone familiar with docker and terramoney, please help me.
I may have installed docker incorrectly.
After install docker, my docker desktop is stopped.
This is root directory
├─── config/
├─── img/
├─── pseudo-feeder/
└─── terracore/
docker-compose.yml
fcd.env
init.sql
LICENSE
README.md
Related
I configured PhpStorm for running tests from docker container in the IDE by clicking the Run button, but I got the following error when I run them:
Doctrine\DBAL\Exception\ConnectionException : An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
from .env:
database_host: sp_mysql
database_port: null
docker-compose:
version: "3.4"
services:
nginx:
container_name: sp_nginx
image: nginx
ports:
- 8080:80
volumes:
- ./docker/nginx/conf:/etc/nginx/conf.d/:ro
- ./var/log/nginx/:/var/log/nginx:cached
- ./web:/app/web
depends_on:
- php
networks:
- internal
php:
container_name: sp_php
image: sp/php
build:
context: ./
dockerfile: ./docker/php/Dockerfile
volumes:
- ./:/app
- ~/.ssh:/root/.ssh
depends_on:
- mysql
networks:
- internal
mysql:
container_name: sp_mysql
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ./docker/mysql/conf:/etc/mysql/conf.d
- mysql_data:/var/lib/mysql
ports:
- 3308:3306
networks:
- internal
networks:
internal:
volumes:
mysql_data:
But if I go directly to php container it works:
docker exec -it sp_php vendor/bin/phpunit
i setup my ide Docker/PHPUnit config by this guide:
https://www.youtube.com/watch?v=I7aGWO6K3Ho&t=240s
To solve this problem i set this in .env
host: "172.19.0.1" // docker network bridge gateway
port: "3308" // my db port from docker-compose
https://docs.docker.com/network/network-tutorial-standalone/
This question already has answers here:
How to fix docker: Got permission denied issue
(33 answers)
Closed 9 months ago.
Docker-compose.yml file:
version: "3"
services:
terrad:
image: terramoney/localterra-core:bombay
pull_policy: always
volumes:
- ./config:/root/.terra/config
networks:
- terra
ports:
- "26657:26657"
- "1317:1317"
- "9090:9090"
- "9091:9091"
command: terrad start
oracle:
image: terramoney/pseudo-feeder:bombay
pull_policy: always
depends_on:
- terrad
networks:
- terra
environment:
TESTNET_LCD_URL: http://terrad:1317
command: start
postgres:
image: postgres:12
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- terra
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
# redis:
# image: redis:latest
# networks:
# - terra
# ports:
# - "6379:6379"
fcd-collector:
image: terramoney/fcd:1.0.0-beta.2
depends_on:
- terrad
- postgres
volumes:
- ./logs:/app/logs
networks:
- terra
env_file: fcd.env
command: collector
restart: unless-stopped
fcd-api:
image: terramoney/fcd:1.0.0-beta.2
depends_on:
- terrad
- postgres
volumes:
- ./logs:/app/logs
networks:
- terra
ports:
- 3060:3060
env_file: fcd.env
command: start
networks:
terra:
driver: bridge
when trying to run docker-compose up I am facing this error:
My docker-compose version is 2.1.1
I got this error
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.project%3Dlocalterra%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied
You have set pull_policy to false. The allowed values are always, never, missing or build. You can also keep it empty.
Docs are here.
I'm pretty new with using docker and especially docker-compose and i'm trying to create a docker-compose but it fails with:
"failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount155987974/Dockerfile: no such file or directory".
My docker-compose looks like this:
version: '3.7'
services:
document-mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27017:27017
volumes:
- mongodb_data_container:/data/db
keyring-mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27018:27017
volumes:
- mongodb_data_container2:/data/db
document-api:
build:
context: https://github.com/International-Data-Spaces-Association/ids-clearing-house-core.git
container_name: "document-api"
depends_on:
- keyring-api
- document-mongo
environment:
# Allowed levels: Off, Error, Warn, Info, Debug, Trace
- API_LOG_LEVEL=Info
ports:
- "8001:8001"
volumes:
- ./data/document-api/Rocket.toml:/server/Rocket.toml
- ./data/certs:/server/certs
keyring-api:
build:
context: https://github.com/International-Data-Spaces-Association/ids-clearing-house-core.git
container_name: "keyring-api"
depends_on:
- keyring-mongo
environment:
# Allowed levels: Off, Error, Warn, Info, Debug, Trace
- API_LOG_LEVEL=Info
ports:
- "8002:8002"
volumes:
- ./data/keyring-api/init_db:/server/init_db
- ./data/keyring-api/Rocket.toml:/server/Rocket.toml
- ./data/certs:/server/certs
volumes:
mongodb_data_container:
mongodb_data_container2:
OS: Windows 10
Does anyone know how to fix this error?
Try to use
DOCKER_BUILDKIT=0 docker-compose build
docker-compose up
source : https://docs.docker.com/build/buildkit/
i keep getting this error for my docker build :
"0":"SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not
known","1":"#1 Zend_Db_Adapter_Pdo_Mysql->_connect()
However, if i docker-compose down and then docker-compose up it works for a coupe of mins and then crashes again.
Is this to do with the network cache. Is there somthing that i should clear ?
this is my docker compose file. --you will note that i do provide a link to database:
version: "2"
services:
web:
build: ./developer
ports:
- "8228:80"
links:
- database
volumes:
- total-sync:/var/www/html:nocopy
env_file:
- env
database:
image: mysql:5.7
ports:
- "3907:3316"
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=default
volumes:
- ./dump:/docker-entrypoint-initdb.d
- ./db/mysqlconf:/etc/mysql/conf.d
- ./mysqladata2.3.4:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8583:80"
links:
- database
volumes:
total-sync:
external: true
dbdatas:
driver: local
docker-compose.yml:
version: '3'
services:
mysql56:
image: mysql:5.6
container_name: mysql56
volumes:
# - ./mysql:/var/lib/mysql
- ./var:/var
ports:
- 3307:3306
- 33060:33060
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: 'root#123'
networks:
- shanhy-ci
networks:
shanhy-ci:
driver: bridge
run:
docker-compose up
It outputs error:
Creating mysql56 ... error
...
merged/var/lib: file exists\\\"\"": unknown
ERROR: Encountered errors while bringing up the project.
But if I modify docker-compose.yml:
volumes:
- ./mysql:/var/lib/mysql
# - ./var:/var
So he can work normally, I don't know why,
Why does docker have/var/lib/mysql, but does not have /var?
image: mysql:5.6 : https://github.com/docker-library/mysql/blob/4ee6cf34697d33b2f71144ef55f96867b71220d5/5.6/Dockerfile