docker-compose

Building two differently tagged docker images with docker-compose

≯℡__Kan透↙ 提交于 2021-02-11 16:01:31
问题 I am currently on the way to deploy a java application with Docker and K8s. As I am using a Raspberry Pi Kubernetes Cluster I want to generate two images, one for the x86 plattform, and one for the arm32v7 (for testing on the Raspberry cluster). The goal is to generate two differently tagged docker images with one Dockerfile and push the resulting images to Docker Hub. I use the following Dockerfile. FROM openjdk:8-alpine as x86 RUN mkdir -p /usr/src/app COPY project/generated/distributions

cannot connect to mongodb container host

泄露秘密 提交于 2021-02-11 15:43:50
问题 im trying to connect to a mongodb container, but it does not work, does not recognize the host. this is my docker-compose.yml file with the service: version: '3' services: mongodb: build: context: . dockerfile: docker/mongodb/Dockerfile restart: always environment: DATABASE: database USERNAME: user PASSWORD: pass ports: - '5100:27017' volumes: - ./data/db:/data/db This is my dockerfile for mongodb: FROM mvertes/alpine-mongo:4.0.5-0 ENV MONGO_INITDB_DATABASE: ${DATABASE} ENV MONGO_INITDB_ROOT

Best option to access network share in docker windows container with Docker Compose

不问归期 提交于 2021-02-11 15:02:28
问题 I am new to docker, so please bear with my naive questions. We are trying to host a dot net application in a Windows container. We were successful in hosting the application in the container. However, the application is accessing the network share like \\machinename\abc. We tried to create a volume of type "NFS" but looks like that does not work well in Windows container(How to directly mount NFS share/volume in container using docker compose v3). volumes: example: driver: local driver_opts:

Can't connect to other containers inside docker network

巧了我就是萌 提交于 2021-02-11 15:02:03
问题 I have a few containerized projects I would like to talk to each other into a network called 'dev_network'. I would expect to be able to start up both containers and be able to ping them from inside the containers.. E.g. I should be able to ping foo from bar , but I cannot. root@75cba11f489c:/# ping bar ping: bar: Name or service not known These projects live in separate folders , but I would like them to connect to the same network and be able to talk to each other. Here's a simple

Trying to distribute data processing across a cluster and then aggregate it in master

蓝咒 提交于 2021-02-11 14:50:56
问题 Right now I have a Python Application which runs 50 threads to process data. It takes an xlsx file and will process a list of values, and will output a simple csv. I said to myself, since this is a simple Python App with 50 threads, How can I create a cluster to distribute data-processing even more? FOR EXAMPLE: Have each Worker node process a subset given to it by the master. Well that sounds easy, just take the master app slice up the dataset generated and then push it to the workers with

docker-compose.yml, postgress, how to setup db, tables and prepop in an init.sql file?

人盡茶涼 提交于 2021-02-11 14:25:39
问题 I would like to add a DB, table and prepopulate with some kind of init.sql file. not sure what the init.sql file looks like. Also not sure where I would be putting the ADD command. This docker-compose.yml file works version: '3.6' services: postgre: image: postgres:11.1-alpine ports: - "5432" environment: POSTGRES_USER: 'user' POSTGRES_PASSWORD: 'password' POSTGRESS_DB: 'db_amex01' volumes: - ./init:/docker-entrypoint-initdb.d/ 回答1: You can add *.sh script(s) and/or *.sql instructions to the

Nginx reverse-proxy not serving static files

巧了我就是萌 提交于 2021-02-11 14:17:25
问题 I tried to start some services via docker-compose. One of them is a nginx reverse-proxy , handling different paths. One path ("/react") is to a containerized react_app with a nginx on port 80. Solely, the reverse-proxy is working correctly. Also, if I server the nginx of the react_app on port 80, all work's fine. Combining both without changing anything in the config leads to 404 for static files like css and js. Setup #1 Correct forward for path /test to Google. docker-compose.yml version:

gRPC-Node Error: Unexpected token u in JSON at position 0

蓝咒 提交于 2021-02-11 14:16:59
问题 So I keep getting this 'unexpected token u in JSON at position 0' error. I'm currently make a request from the main initiator which is making a gRPC request to customers gRPC server. When I don't containerize my files and manually npm install packages in each directory, it works smoothly. However, for some reason when I containerize my files, it has this issue. Usually this issue occurs with asynchronous requests (gRPC is async so makes sense), and I think they're racing to completion, but

Nginx reverse-proxy not serving static files

可紊 提交于 2021-02-11 14:13:56
问题 I tried to start some services via docker-compose. One of them is a nginx reverse-proxy , handling different paths. One path ("/react") is to a containerized react_app with a nginx on port 80. Solely, the reverse-proxy is working correctly. Also, if I server the nginx of the react_app on port 80, all work's fine. Combining both without changing anything in the config leads to 404 for static files like css and js. Setup #1 Correct forward for path /test to Google. docker-compose.yml version:

Access network in other docker container

痞子三分冷 提交于 2021-02-11 13:50:42
问题 I have two docker containers. The first has an OpenVPN server where multiple clients are connected. Now I want to reach one of the clients through the VPN from the other container (for example with a simple ping command). Is that possible? At the moment I linked the containers this way: version: '3' services: app: build: context: . dockerfile: app.dockerfile links: - ovpn:ovpn ovpn: build: context: . dockerfile: ovpn.dockerfile working_dir: /etc/openvpn privileged: true volumes: - ./openvpn: