Questions tagged [docker-compose]

1

votes
0

answer
97

Views

Docker-compose: bind Celery to Postgres database

My Docker app runs with Flaskas backend and Celeryas an asyncronous task manager. Task results are then dumped in a SQLalchemy database owned by Postgres. However, I am not being able to make Celery interact with Postgres. STRUCTURE docker-compose-dev.yml web/ entrypoint.sh celery_worker.py migrati...
data_garden
1

votes
1

answer
811

Views

Can't connect to mongo docker image with mongoose

I'm trying to run a simple docker setup with node and mongo: Dockerfile: FROM node:8.9.4-alpine RUN mkdir /app WORKDIR /app COPY package.json /app/ COPY package-lock.json /app/ RUN npm install ADD . /app/ docker-compose.yml: version: '3' services: db: image: 'mongo' ports: - '27017:27017' api: build...
Philip Feldmann
1

votes
2

answer
1.1k

Views

docker-compose restart connection pool full

My team and I are converting some of our infrastructure to docker using docker-compose. Everything appears to be working great the only issue I have is doing a restart it gives me a connection pool is full error. I am trying to figure out what is causing this. If I remove 2 containers or (1 complete...
Ryan Condron
1

votes
1

answer
747

Views

What is the actual use of labels in docker-compose

I was reading docker-compose tutorials and want to understand more about labels I read that they can be used to store metadata. Is labels useful just to store metadata or Are there any other significant uses? Please help me to understand this more.
a8989
1

votes
2

answer
543

Views

Connect to docker-compose network using docker run

Let say I have running orchestration with docker-compose with docker-compose.yml looking like this: version: '2.2' services: service1: # ... networks: - compose_network service2: # ... networks: - compose_network networks: compose_network: I aim to run and connect temporarily one container to compos...
Nixwill
1

votes
2

answer
394

Views

Netstat not showing ports exposed by docker

For some reason netstat is not listing ports exposed by docker. As suggested here I usedEXPOSE for both ports 8080 and 5050. But none of them is visible from host. Dockerfile ... FROM openjdk:11-jre-slim COPY --from=build /usr/src/app/api/target/track-metadata-api-*.jar /app/track-metadata-api.jar...
Matjaž Mav
1

votes
2

answer
1.4k

Views

Docker compose script complaining about a python module import

Docker script docker-compose --version is now throwing a weird error and is complaining about a missing python module ordered_dict. Not sure why is this happening but previously it was working just fine. Not sure if its related but I installed pip for python and later installed awscli using the pip....
htopiwala
1

votes
2

answer
154

Views

Peer exit immediatly after starting with “fatal error: unexpected signal during runtime execution” with Fabric1.4 on Ubuntu18.04

I'm using Fabric v1.4 on Ubuntu 18.04.02LTS. I installed everything on this machine this week following the tutorials, so I got the Samples, Binaries and Docker Images of v1.4 (latest), like: hyperledger/fabric-peer 1.4.0 304fac59b501 5 weeks ago 157MB hyperledger...
Tommaso Martin
1

votes
2

answer
162

Views

ZuulException (SendErrorFilter) at first call

I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refre...
Nick
1

votes
2

answer
31

Views

idiomatic Makefile and command arguments

Context I have a Makefile to run docker-ized service RUN = docker-compose run $(ARGS) --rm serivce .PHONY: shell shell: ${RUN} /bin/sh .PHONY: server server: $(eval ARGS=--service-ports) ${RUN} Problem server task needs additional arguments(--service-ports) set to start the container. Just hardcodin...
Maryan
1

votes
2

answer
36

Views

docker-compose.yaml won't parse

I am having trouble with running my docker-compose.yml. I have retrieved a pre-made docker-compose file from a github page and customized it to my needs. When trying to parse it, it returns errors. I am not very schooled in yaml syntax, so it is difficult for me to understand where the error stems f...
UTq
1

votes
1

answer
40

Views

docker-compose: MySQL service not running

I want to create a docker-compose file combining a custom maven environment, a specific runtime environment and a mysql server runtime. Compose file looks like this: version: '3.7' services: mysql: image: mysql:5.7.25 command: --default-authentication-plugin=mysql_native_password environment: MYSQL_...
DerPauli
1

votes
2

answer
24

Views

Get docker-compose up to only run certain containers

So i currently can use 'docker-compose up test' which only runs my database and my testing scripts. I want to be able to us say docker-compose up app' or something like that that runs everything besides testing. That way Im not running unnecessary containers. Im not sure if theres a way but thats wh...
Rutger Luther
1

votes
2

answer
49

Views

Docker container doesn't run until I click “Enable volumes” in Kitematic

I recently created a docker-compose file here: https://github.com/ffMathy/Screeps.Server.Docker/blob/master/docker-compose.yml I'm currently on Windows, but running Linux containers. When I try to start up my containers using docker-compose up, they appear just fine. However, the screeps container d...
1

votes
2

answer
43

Views

Use container name or id as environment variable in docker compose yml

How can I use the container's name or ID as env variable in docker-compose.yml? I tried multiple ways (no one is good): environment: SERVER_NAME: '${SERVER_NAME}' SERVER_NAME: container_name SERVER_NAME: {{container_name}} SERVER_NAME: '${container_name}' SERVER_NAME: '{{.Host.Hostname}}' SERVER_NAM...
GhitaB
0

votes
0

answer
4

Views

502 Bad Gateway with pgadmin4 behind nginx?

I have an api running in docker with: nginx nodejs api postgresql pgadmin4 certbot When I try to add an endpoint for pgadmin so I can work with the database, I get a 502 bad gateway regardless how I'm setting up the ports for proxy_pass or in docker-compose for the actual container for pgadmin. dock...
SudoGaron
0

votes
0

answer
16

Views

Multiple Docker containers using the same image with Spring Boot Profiles & Gradle

I'm trying to run multiple instances of an API from the same image and same Gradle script. As you can see below in my docker-compose file, I have api-participant, and would like to create api-participant2, 3, 4 etc, because they each need their independent, custom applications, DB, frontend, etc. Th...
Dar K
0

votes
0

answer
5

Views

Docker Apache HTTPD with Certbot

I'm attempting to run Wordpress on Docker along with MySQL. Here are the contents of the docker-compose.yaml file version: '3.3' services: db: image: mysql:5.7 volumes: - blog-vol:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: secretpass MYSQL_DATABASE: wordpress MYSQL_USER: wpuser...
user6123723
1

votes
2

answer
920

Views

Unable to connect docker container to logstash via gelf driver

Hi guys i'm having trouble to send my server container logs to my ELK stack. No input is sent to logstash so i'm unable to set kibana index for collecting logs. I think my problem is in the port settings. Here is the docker-compose yml for the LAMP stack (only the server service): version: '3' servi...
1

votes
2

answer
1.5k

Views

Remote Debugging with JPDA won't connect to Tomcat through eclipse when using Docker-Compose

I'm very new to Docker so this could be something simple I'm doing wrong. With all the solutions out there I've been able to get remote debugging working with eclipse when using 'Docker run' to launch the Tomcat container. docker run -it --rm -e JPDA_ADDRESS=8000 -e JPDA_TRANSPORT=dt_socket -p 8888:...
Olmstov
1

votes
1

answer
1k

Views

Usage of env variable in docker compose run command

Running the command docker-compose run -e TYPE=result mongo_db_backup should give me the value of the given TYPE variable: mongo_db_backup: image: 'mongo:3.4' volumes: - '/backup:/backup' command: sh -c '$$(echo $TYPE)' But instead I get the error The TYPE variable is not set. Defaulting to a blank...
user3142695
1

votes
2

answer
1.4k

Views

Kibana and Docker-Compose: Automatically load in saved object

Goal: Load in Kibana saved object when starting Elastic Stack from Docker-Compose. I have an 'export.json' object from Kibana, containing my default index, 10+ visualizations, and dashboard setup. I am able to successfully start the Elastic Stack from Docker-Compose and manually load the object, but...
Alan
1

votes
1

answer
734

Views

When does docker-compose build a local image and when does it pull from docker hub?

Following the tutorial of docker compose. Let's say you have a Dockerfile for your app and docker-compose.yml for its services. Dockerfile FROM ruby:2.3.3 ... COPY . /myapp docker-compose.yml version: '3' services: db: image: postgres web: build: . image: dre-hh/myapp volumes: - .:/myapp depends_on:...
dre-hh
1

votes
2

answer
1.5k

Views

Run docker service on HTTPS

Currently, I run a simple docker container by using the following files. DockerFile FROM microsoft/aspnet:4.7.1 WORKDIR /inetpub/wwwroot EXPOSE 80 COPY index.html . docker-compose.yml version: '3.4' services: testapp: image: mytestapp:${TAG:-latest} build: context: . dockerfile: Dockerfile docker-co...
marvelTracker
1

votes
2

answer
4.1k

Views

Dockerfile: how to set env variable from file contents

I want to set an environment variable in my Dockerfile. I've got a .env file that looks like this: FOO=bar. Inside my Dockerfile, I've got a command that parses the contents of that file and assigns it to FOO. RUN 'export FOO=$(echo '$(cut -d'=' -f2
Ben Downey
1

votes
1

answer
2.1k

Views

Error running containers with docker-compose, error pulling images from my private repo in dockerhub

I have 3 images pushed on my private repository in docker hub. Locally, the way I've always run the 3 images is via docker-compose up -d, and it works. Now I'm trying to run this images in a different server so I pushed them in a private repository in docker hub. So in order to run them in the new...
magnoz
1

votes
2

answer
156

Views

Docker in production, source data, db data, update process [closed]

I just start using docker, and at this moment I have some questions about docker in the production environment. First of all, what permissions should I use on prod server? 
Should I create non root user and run docker under this user? Or it does not matter. What about firewall, should I open ports...
wtorsi
1

votes
1

answer
992

Views

Passing aws credentials to Docker

I have a docker container golang code which interacts with aws resources. In the testing environment, we use iam role. But How do I test locally. How to use aws credentials to run my docker locally.I am using docker file to build the docker image.
user846445
1

votes
1

answer
72

Views

“No Go files in…” error when i use go with docker compose

I installed Go on Ubuntu 16.04. This is my GOPATH=/home/{username}/work. I created a project into /home/{username}/work/src. This is my project folder hierarchy. project-name services configuration api main.go Dockerfile bff api main.go Dockerfile docker-compose.yml favicon.ico README.md I can build...
Celal Yildirim
1

votes
2

answer
135

Views

Docker design for multiple apps [closed]

What is a good design when you have multiple apps? So basically I have dockerized a react app and a nodejs app. So my idea is to have 3 docker containers - one for react app, one for nodejs backend and nginx as a router. Any call with / will route to react app and anything with /api will route to no...
bhb
1

votes
3

answer
40

Views

Docker COPY command not mounting a directory

Host OS: Linux Container OS: Linux I'm trying to learn how to use docker. I use docker-compose and I'm successfully building images and running containers. Now if I want to mount some directory inside the container the documentation says that I should use the COPY command inside Dockerfile. COPY /pa...
user568021
1

votes
1

answer
26

Views

How to use same ports in seperate containers?

I have two docker containers, each running roscore which uses port 11311. Each of the containers has seperate IP address and uses different namespaces when publishing and subscribing. Shouldn't I be able to treat each container as a separate machine? What I want to do is rostopic pub from the host t...
Ender
1

votes
1

answer
39

Views

Listen to a same port via multiple Docker containers

I have brought up a Kafka messaging service where Kafka broker is setup in a docker and is on port 9092. Host port 9092 is mapped to the container port 9092. Now I am trying to bring up a consumer which listens to host port 9092 to consume messages. I'm trying to setup consumer container after all b...
Darshu Bc
0

votes
0

answer
8

Views

Git add show modified file but the file not changging

I have a private remote repository and update a file inside local branch, adding this console.log('test') then add it git add . when i check git status -s i see M path/toFile.js but why when i running the site locally i cant see my console.log my question its when someone makes a change to a fil...
KEKUATAN
1

votes
1

answer
94

Views

Docker - Import Json Docment Inside The Solr Core

I want to ask if there is a way to import Json document into the core from the docker file while creating the core, or if I can mount a pre-created core directory with the Json file already imported inside it. An another method than import the document from Solr server page in Documents core tab and...
Ebraheem Alrabee'
1

votes
0

answer
461

Views

Setup apache multiple virtual hosts with fpm and docker

Hi guys here is the issue, i'd like to have 2 virtual hosts on Apache: one pointing to www.mysite.com (php-fpm container) and the other pointing to www.mysite.com/blog (wordpress fpm container). I'm using Docker with compose, the actual file is something like this server: build: ./docker/apache imag...
Alessandro Lucarini
1

votes
1

answer
258

Views

Docker compose build relative path

creditcard-monk: build: context: ./creditcard dockerfile: Dockerfile args: JAR_FILE: target/creditcard-1.0.0.jar Docker compose version 3.0. The jar_file argument is used to copy the jar-file to spring-boot jar under docker container I get the error failed to build: COPY failed: stat /var/lib/docker...
Fryder
1

votes
0

answer
344

Views

docker-compose command use gem:foreman about Ruby on Rails and not release server.pid when stop container

I use docker-compose on Ruby on Rails and have a trouble. In docker-compose, I use command and direct foreman. When stop docker-compose by Ctrl-c and restart by docker-compose up, Rails cause an error A server is already running. Check /www/tmp/pids/server.pid.. Of course, I know rm tmp/pids/server....
pencilrocketman
1

votes
0

answer
191

Views

Docker Compose file to Docker Stack

I have found an awesome repo that uses docker-compose however I would like to use it Docker Cloud Stacks (I am a newbie). What would I have to do to be able to swap it over? docker-compose: version: '2' services: mariadb: image: wodby/mariadb:10.2-3.0.2 php: # 1. Images with vanilla WordPress – wo...
Jess McKenzie
1

votes
0

answer
86

Views

Port forwarding from docker-compose XXX:443

I own a python + uwsgi + nginx app. I am able to launch this app through this docker-compose file: version: '3.4' services: backend: restart: always image: backend:0.1 depends_on: - db expose: - 5001 volumes: - share_vol_lab:/home/ubuntu/data frontend: restart: always image: frontend:1.1 depends...
ido

View additional questions