Questions tagged [docker-compose]

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
1

votes
0

answer
29

Views

Docker compose: How to invoke command in one container from another?

I understand docker compose creates a network of containers. Now, is there a way to provide a program implemented in a container_B and invoke it from within container A? Consider this example: version: '3.2' services: container_A: image: 'alpine:latest' links: - container_B container_B: image: 'pyt...
user3139868
1

votes
1

answer
361

Views

docker-compose and 127.0.0.1 internal access to service

I have the following docker-compose.yml configuration (simplified for presentation reasons): version: '3' services: web: image: tomcat:8.0.48-jre8 db: image: postgres:9.6.6 expose: - '5432' and I can access db service from web service by using postgres:5432 url. I wonder is there is a way to map/rem...
user2068645
1

votes
1

answer
432

Views

Shared build logic with docker-compose and multi-stage Dockerfiles

I am using docker-compose with multi-stage Dockerfiles to build and run multiple services. This works, but the 'build' portion of each multi-stage build is largely copy-and-pasted between each service's Dockerfile. I want to reduce the copy-and-paste / centralize the common build logic in one spot....
LegNeato
1

votes
3

answer
98

Views

Must I use a private Docker registry to keep my source private?

I've just started playing around with Docker recently and wondered if I don't plan to make my code public, does that mean I will have to pay for a private Docker registry? The reason I'm asking is because it seems like, from the tutorials I'm following, when deploying my container to production, I w...
Carven
1

votes
1

answer
380

Views

Docker variable expansion in compose environment

I've found that if I define an environment variable in a docker-compose service entry, that it will not be expanded in other variables defined in the environment section but it will be expanded if the variable is defined in an env file, e.g. someserver: image: 'some-server:latest' restart: always po...
KramKroc
1

votes
2

answer
877

Views

How to add known_hosts for passwordless ssh within docker container in docker-compse.yml?

I want to have passwordless ssh within two docker containers. How to add known_hosts entry for that using docker-compose.yml file I want to implement ansible on docker env. To deploy and run rpm on deployment node, I need passwordless ssh from container1 to container2. For that I have to add known_h...
user2664210
1

votes
0

answer
190

Views

Ignore driver: cloudstor:aws in docker-compose.yml

I'd like the following driver and driver_opts to be ignored when running in a particular environment (mainly development): volumes: foobar: name: '{{.Service.Name}}-{{.Task.Slot}}-foobar-vol' # AWS EBS only driver: cloudstor:aws driver_opts: backing: relocatable ebstype: gp2 size: 4 If I run docker-...
willsquire
1

votes
0

answer
416

Views

How to specify build options for docker-compose build stage?

I have a main docker-compose.yml: version: '3' services: recognizer: container_name: recognizer build: ./recognizer hostname: recognizer restart: always ports: - 8084:8084 network_mode: 'host' I have a folder recognizer with Dockerfile and docker-compose.yml: Dockerfile: FROM openjdk:8 RUN mkd...
Denis
1

votes
2

answer
81

Views

command option gets ignored in docker-compose.yaml

These are the contents of my docker-compose.yaml. rabbitmq: image: docker_rabbitmq hostname: rabbitmq restart: always ports: - '5672:5672' elasticsearch: image: docker_elasticsearch hostname: elasticsearch restart: always ui-console: image: docker-ui-console hostname: ui-console restart: always port...
user2010672
1

votes
1

answer
475

Views

Why is consul health check returning an empty array?

We have a docker-compose.yml file: version: '3' services: consul: container_name: consul command: agent -dev -config-dir=/consul/config dns: 8.8.8.8 hostname: consul-docker image: docker-registry.mycompany.net/ap/consul-ent:0.9.2 ports: - '8500:8500' volumes: - ./consul/config/conf.json:/consul/conf...
user674669
1

votes
1

answer
919

Views

Node+NPM on Laradock

I followed everything on the documentation on how to enable NPM on the workspace. However, when I run docker-compose exec workspace bash then check node -v it is missing. The document didn't say too how to use it.
Leandro Garcia
1

votes
0

answer
465

Views

Get Environment variable from .env file and pass to Dockerfile

This seems like a huge oversight on the developers behalf as I can't understand the use case where you don't want the image build to know about .env variables. I'm running Laravel and I'm access some AWS keys from with a .env file. When I try to build an image via a Dockerfile, the php compsoer auto...
MattBoothDev
1

votes
0

answer
205

Views

Docker-compose stops the container after entrypoint is done

I need sql server container with some database. I've prepared the following dockerfile: FROM microsoft/mssql-server-linux:latest ENV ACCEPT_EULA Y ENV SA_PASSWORD yourStrong(!)Password WORKDIR sqlserver COPY load_db.sh load_db.sh COPY /resources/sql/ sql ENTRYPOINT ./load_db.sh So it runs load_db.sh...
Serg046
1

votes
1

answer
856

Views

Docker : image build failed

when building docker apache image, the building fail in this step : Step n/m : COPY httpd-foreground /usr/local/bin/ ERROR: Service 'apache' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder511740141/httpd-foreground: no such file or directory this is my docker_compose.yml file v...
Mohammad.Trabelsi
1

votes
0

answer
474

Views

How to protect Docker (data-only) volumes from deletion?

I use to create Docker (data-only) volumes like this: docker create -v /data/--name data-container busybox Then I use these volumes in docker-stack setups, transfer them to different hosts, export them to read out logs, do backups, ... But from time to time it happens that someone (accidentally) cle...
Datz
1

votes
0

answer
4.7k

Views

set docker host ip (advertised.host.name) for mac and ubuntu in docker-compose.yml

I have a web application running in docker container, and a kafka broker running in another docker container. I am using docker-compose to setup up the docker containers. but I found that it is a little difficult to config the networking for docker containers. so, I posted some questions: Java & Kaf...
BAE
1

votes
3

answer
235

Views

Dockerfile - deploy mysql dump in entrypoint

Is it possible to connect to external container in entrypoint and upload DB dump to it? I always get web_1 exited with code 0 on this line execution: mysql -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < magento-sample-data-1.9.1.0/magento_sample_data_for_1.9.1.0.sql in install-sampl...
freento
1

votes
0

answer
214

Views

How to prevent nginx errors due to docker boot sequence

I have managed swarm using compose.yml as follows. compose.yml version: '3' services: web: image: nginx depends_on: - db - api deploy: replicas: 2 update_config: parallelism: 2 delay: 10s db: image: mysql environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: main MYSQL_USER: root MYSQL_PASSWORD...
sukho
1

votes
0

answer
46

Views

Impossible to access docker private registry on gitlab

I'm trying to set Continuous integration with gitlab and a private docker registry. I've followed the whole tutorials to set it up, I managed to set the registry tab on the left in a project environment but when I click on this tab, gitlab brings me immediately an error 500. I use gitlab as a docker...
Thomas
-1

votes
0

answer
9

Views

Allowing images to persist through new docker deployments

I have a directory that stores uploaded images, but when I do 'sudo -E docker-compose up --build -d backend-dev', the images don't persist. I believe the solution is using a docker mounted volume and attaching that to the directory, but need assistance with adding the correct path. version: '3.5' se...
Berheet
1

votes
1

answer
31

Views

Connecting Multiple Docker Apps

I run a series of sites that run independently but need to be able to make curl calls via PHP to a custom single sign on service. If I set all the sites up as separate container stacks (meaning that sso has it's own set of shared containers (Nginx, PHP, and MySQL) and site1 has its own set of shared...
user2532598
1

votes
0

answer
751

Views

Docker getting started 3 - Docker Compose unable to connect - connection refused

I am following the Docker Getting Started Tutorials and I am stuck at part 3 (Docker Compose). I am operating on a fresh Ubuntu 16.04 installation. Following the tutorial from part 1 and part 2, except logging in to a Docker account and pushing the newly created image to a remote repository. The Do...
Kurobara
1

votes
0

answer
161

Views

DHCP server causes slow docker-compose operations

[Updated as I have found what is causing the problem; now I need to know why.] When I use a custom DHCP server on my network (a Raspberry Pi running Pi-hole) Docker projects on my system take up to two minutes to start. With networking on my computer turned off, or using the DHCP server on my cable...
Daniele Procida
1

votes
0

answer
36

Views

volume with files in Dockerfile, available in other containers with docker-compose

I have one Dockerfile which more or less does: VOLUME /files RUN echo 'foo' > /files/x And then I have a docker-compose.yml which more or less is: version: '3' services: files: volumes: - files:/files other_service: volumes: - files:/files depends_on: - files volumes: files: The problem is that the...
fj123x
1

votes
2

answer
143

Views

Docker Slave Connect to Docker Gitlab | Docker DNS

So I have a bit of a docker network problem that I cannot get to work. I have a compose file for all of my systems. gitlab, sonar, nexus, jenkins live inside this compose file. Containers: prod-gitlab, prod-jenkins, prod-sonar, prod-nexus I have my jenkins slave set up to use the Docker Plugin so s...
GSUgambit
1

votes
1

answer
484

Views

Service access another service on 127.0.0.1?

I'd like my web Docker container to access Redis on 127.0.0.1:6379 from within the web container. I've setup my Docker Compose file as the following. I get ECONNREFUSED though: version: '3' services: web: build: . ports: - 8080:8080 command: ['test'] links: - redis:127.0.0.1 redis: image: redis:alpi...
Karl Morrison
1

votes
0

answer
130

Views

Source /opt/nvm/nvm.sh via Docker Compose

I have a Dockerfile. Current user is root. The script sets NVM_DIR to /opt/nvm. The script installs NVM (https://github.com/creationix/nvm) via the curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash command. I set the entrypoint to ENTRYPOINT ['npm', 'run'] and the c...
Karl Morrison
1

votes
1

answer
332

Views

Access Jetty server inside Docker from host

I've been trying to deploy a Jetty server using docker-compose, but I can't seem to make my app's port available from my host machine. Here is my compose.yml: version: '3.3' networks: app-network: services: db: image: postgres:alpine command: postgres -c hba_file=/etc/pg_hba.conf environment: POSTGR...
Naliwe
1

votes
0

answer
126

Views

Logging queries in elasticsearch on docker

I'm running elasticsearch 2.4.x on docker with docker-compose for a local application. I'm trying to debug a library for querying elasticsearch so I'd like to see docker logs elasticsearch show me each query logged. I've tried sending options as suggested in their logging config, but as I'm an elast...
eirikir
1

votes
1

answer
338

Views

Setting selenium browser version via docker compose

I'm running selenium grid through docker compose and targeting the different versions through my desired capabilities. I have a requirement to test multiple browser versions however at the moment I need to target the full version i.e chrome versions '63.0.3239.132' or '64.0.3282.140' I want to be ab...
LiamHarries
1

votes
0

answer
96

Views

How to check if docker-compose's “command” was executed

I've added command: bash -c './wait-for-it.sh -t 4 -s php:9000 -- bash run-ssh-on-php.sh' to my docker-compose.yml php: build: docker/php user: '$LOCAL_USER_ID:$LOCAL_GROUP_ID' depends_on: - mysql - rabbitmq - mail - phantomjs - data volumes_from: - data ports: - '9000:9000' environment: - SYMFONY...
pablosd
1

votes
1

answer
310

Views

Why docker-compose do not use port binding as expected?

I'm using this docker-compose config for running a classic nodejs app + mysql + redis: version: '3' services: app: container_name: app restart: always build: context: ./app/ depends_on: - db - redis - elasticsearch links: - db - redis - elasticsearch ports: - '127.0.0.1:${APP_PORT}:${APP_PORT}' env...
Elias Platek
1

votes
2

answer
1.7k

Views

docker-compose linking mysql and php containers

I have a docker-compose as follow: version: '3.2' services: web: build: . image: lap volumes: - ./webroot:/var/www/app - ./configs/php.ini:/usr/local/etc/php/php.ini - ./configs/vhost.conf:/etc/apache2/sites-available/000-default.conf links: - dbs:mysql dbs: image: mysql ports: - '3307:3306' environ...
sakhunzai
1

votes
0

answer
387

Views

I can't setup docker-compose containers with an ipv6 that depend on each other

I'm looking for a solution where docker-compose and make 2 docker containers communicate nicely and that can have an ipv6 address that can bridge to a outside address. Host OS: CentOS 7 docker version: 17.12 docker-compose version: 1.9.0 I have a docker compose file that works for ipv4 addressing us...
derek

View additional questions