docker-compose

Connect to Remote MSSQL db from Linux Docker container

 ̄綄美尐妖づ 提交于 2019-12-12 03:27:27
问题 I have a linux docker container built on microsoft/mssql-server-linux/ image. The container doesn't have anything at this moment, I am trying to connect to remote MSSQL db hosted on windows server somewhere. I am not sure exactly how can I do that. The documentation for microsoft/mssql-server-linux/ doesn't provide much of details. Any help would be appreciated. Updated: I have got container working now. But, the container gets exited with code 0 if I try to create and seed db through bash

Connection refused by Docker container

时光毁灭记忆、已成空白 提交于 2019-12-12 03:04:39
问题 I've struggled with this for quite some time. I have a Django application and I'm trying to package it into containers. The problem is that when I publish to a certain port (8001) the host refuses my connection. $ docker-machine ip default 192.168.99.100 When I try to curl or reach by browser 192.168.99.100:8001, the connection is refused. C:\Users\meow>curl 192.168.99.100:8001 curl: (7) Failed to connect to 192.168.99.100 port 8001: Connection refused First remark: I'm using Docker Toolbox.

docker-compose: command not found解决办法

自作多情 提交于 2019-12-12 02:44:42
docker的安装没有问题,但在使用 docker-compose的时候一直提示找不到命令 那这里先升级一下pip : pip install --upgrade pip pip下载docker-compose pip install docker-compose 报错:告诉我Python版本不够 按照其他方法尝试: pip install more-itertools==5.0.0 继续安装: pip install docker-compose 红字没了 来源: CSDN 作者: Deeeelete 链接: https://blog.csdn.net/Deeeelete/article/details/103496918

How can I copy a file from one folder to another folder within a container in Docker?

假如想象 提交于 2019-12-12 02:07:31
问题 I already found ways for moving file between host and container but was not able to figure out on how to moves files within same container using YML. Can some one help me on this? 回答1: You can use ssh command. First find IP of each docker container and then ssh into one terminal to transfer file. man scp The very basic usage: scp remote_user@remote_host:/path/to/remote/file /path/to/local/file and vice versa: scp /path/to/local/file remote_user@remote_host:/path/to/remote/file 来源: https:/

Connect docker-compose files by shared network

北城余情 提交于 2019-12-11 23:19:38
问题 I have separate docker-compose files with common configurations and application configurations. I want to connect containers defined in both docker-compose files by the common network which is defined in docker-compose.yml with the application's images. I need this to connect to the database on the container host. How can I define the same network in another docker-compose-producer file or can? My common docker-compose.yml looks like this: version: '3.3' services: kafka: image: spotify/kafka

docker-compose 编排方式安装redis cluster集群 【redis 集群的收缩】(三)

℡╲_俬逩灬. 提交于 2019-12-11 23:11:10
收缩集群意味着缩减规模,需要从现有集群中安全下线部分节点,下线节点过程如下 1)首先需要确定下线节点是否有负责的槽,如果是,需要把槽迁移到其他节点,保证节点下线后整个集群槽节点映射的完整性。 2)当下线节点不再负责槽或者本身是从节点时,就可以通知集群内其他节点忘记下线节点,当所有的节点忘记该节点后可以正常关闭。 1、下线迁移槽【此处要下线 192.168.11.43:6397 -》redis-master4 主节点】 下线节点需要把自己负责的槽迁移到其他节点,原理与之前节点扩容的迁移槽过程一致, 但是过程收缩正好和扩容迁移方向相反,下线节点变为源节点,其他主节点变为目标节点, 源节点需要把自身负责的4096个槽均匀地迁移到其他主节点上。 目标节点:需要迁入操的节点 源节点:迁出槽的节点 使用 redis-trib.rb reshard 命令完成槽迁移。由于每次执行 reshard 命令只能有一个目标节点, 因此需要执行3次 reshard 命令【执行多少次迁移取决于你主节点的个数,另外一个方法就是,一次性将节点迁移到一个主节点,然后进行槽平衡的操作】 进入集群某一节点 [root@localhost docker-compose-redis-trib]# docker exec -it redis-master1 bash [root@086ae4a63467 config]# 2

Parallel code execution in Docker containers

自闭症网瘾萝莉.ら 提交于 2019-12-11 19:35:43
问题 I have a script that scrapes data by URLslist. This script is executing in a docker container. I would like to run it in multiple instances, for example, 20. For that, I wanted to use docker-compose scale worker=20 and to pass the INDEX to each instance so that the script knows which URLs should be scrapped. Example. ID, URL 0 https://example.org/sdga2 1 https://example.org/fsdh34 2 https://example.org/fs4h35 3 https://example.org/f1h36 4 https://example.org/fs4h37 ... If there are 3

Unable to run two Spring boot services with docker compose. Error: Unable to access jarfile target/gs-rest-service-0.1.0.jar

孤人 提交于 2019-12-11 18:53:49
问题 I had a similar issue before and was recommended to create a new question, again unable to run two services , but this time both services are Spring Boot. The project structure:/ - docker-compose.yml - Dockerfile - pom.xml - src/ - ... other spring boot web service folders and files - rest-bookstore/ (the 2nd webservice) -Dockerfile -rest -src -target -gs-rest-service-0.1.0.jar -... other files and folders The Dockerfile of the first spring boot service(this one is the main one and launches

Docker app server ip address 127.0.0.1 difference of 0.0.0.0 ip

扶醉桌前 提交于 2019-12-11 18:44:55
问题 He everyone. I'm working with docker and trying to dockerize a simple django application that does an external http connect to a web page (real website) so when I set in the Docker file the address of my django server that should work in the container - 127.0.0.1:8000 . my app wasn't working because of the impossibility to do an external connection to the website. but when I set the port for my server: 0.0.0.0:8000 it started to work. So my question is: Why it behaves like that? What is the

Setting an environmental variable in a docker-compose.yml file is the same as setting that variable in a .env file?

假如想象 提交于 2019-12-11 18:38:06
问题 I'm trying to set a specific environmental variable in my docker-compose.yml file. I don't think my docker-compose up is registering/reading it correctly. apigateway.web: image: traefik command: --api --docker # Enables the web UI and tells Traefik to listen to docker environment: - COMPOSE_CONVERT_WINDOWS_PATHS=1 ports: - "80" # The HTTP port - "8080" # The Web UI (enabled by --api) volumes: - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events I know