docker-compose

How to get contents generated by a docker container on the local fileystem (minimal failing example)

给你一囗甜甜゛ 提交于 2019-12-11 01:05:54
问题 This question is a minimal failing version of this other one: How to get contents generated by a docker container on the local fileystem I have the following files: ./test -rw-r--r-- 1 miqueladell staff 114 Jan 21 15:24 Dockerfile -rw-r--r-- 1 miqueladell staff 90 Jan 21 15:23 docker-compose.yml drwxr-xr-x 3 miqueladell staff 102 Jan 21 15:25 html ./test/html: -rw-r--r-- 1 miqueladell staff 0 Jan 21 15:22 file_from_local_filesystem DockerFile FROM php:7.0.2-apache RUN touch /var/www/html/file

Is it possible to use different .env for different services?

拥有回忆 提交于 2019-12-11 00:47:33
问题 I have a situation where it would be nice to have multiple .env files, one for each service in my docker-compose.yml. Is there any way to specify a different filename to use? Can this be done on the level of individual services? I attempted to use the env_file tag, unfortunately, this sets variables for use in Dockerfile and at run-time. The .env file, on the other hand, sets variables to be expanded in docker-compose.yml. 回答1: Unfortunately, it's not possible to specify an alternative name

I can't run rails console with Docker and Passenger/nginx image

人走茶凉 提交于 2019-12-11 00:37:59
问题 I've the next docker-compose container: # docker-compose.yml version: '2' services: web: build: . ports: - "80:80" volumes: - .:/home/app/NAME_OF_MY_APP db: image: postgres:9.4 ports: - "5432" environment: POSTGRES_USER: 'postgres' I cannot figure out how can I run the rails console. I'm using the passenger/nginx image and everything is working. However, my DB is on another container and I'd like to entry at rails console to create manually a couple of users. I tried with: sudo docker-compose

How to pass command line when debugging docker-compose project in Visual Studio?

≯℡__Kan透↙ 提交于 2019-12-11 00:34:37
问题 I created a .Net core 2.1 console application with Linux docker support using Visual Studio 2017. I can run the application using the following command line docker run myApp arg1 arg2 I want to debug it in VS so I set the project docker-compose as the startup project and debug run "Docker Compose" in Visual Studio. However, is there a way to set up the command line arguments? ( arg1 arg2 in my example). 回答1: Unfortunately there is no easy way to do this right now because of the way VS handles

Why does Docker ADD command not copy this file?

孤者浪人 提交于 2019-12-11 00:20:33
问题 In the file below, the file apprequirements.txt is ADDed to the container. I know because pip install works. However, the myworker.py file is not copied/added. Why? FROM python:2.7 ENV PYTHONUNBUFFERED 1 RUN mkdir /code WORKDIR /code ADD ./frontend/apprequirements.txt /code RUN pip install -r apprequirements.txt ADD ./backend/myworker.py /code I run this with docker-compose, you can see the whole example on https://github.com/AvidSoftware-be/Docker-compose-test 回答1: After a deep review into

Composer install doesn't install packages when running in Dockerfile

怎甘沉沦 提交于 2019-12-10 23:34:53
问题 I cannot seem to run composer install in Dockerfile but I can in the container after building an image and running the container. Here's the command from Dockerfile: RUN composer require drupal/video_embed_field:1.5 RUN composer install --no-autoloader --no-scripts --no-progress The output is: Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update But after running the container with docker-compose: ..

How can you get Grunt livereload to work inside Docker?

自作多情 提交于 2019-12-10 23:18:39
问题 I'm trying to use Docker as a dev environment in Windows. The app I'm developing uses Node, NPM and Bower for setting up the dev tools, and Grunt for its task running, and includes a live reload so the app updates when the code changes. Pretty standard. It works fine outside of Docker but I keep running into the Grunt error Fatal error: Unable to find local grunt. no matter how I try to do it inside Docker. My latest effort involves installing all the npm and bower dependencies to an app

Launching Capybara-Webkit on a dockerized Rails 5 app

孤人 提交于 2019-12-10 21:11:38
问题 I'm working on a brand new Rails 5 app, and I can't launch Capybara-Webkit. I'm following these indications. My development process includes Docker-Compose, then CircleCI for building the Docker image and sending it to Google Cloud Registry. The $ bundle install is fine, the $ docker build is done, but I can't even launch a spec locally with Webkit. When I launch this command, it hangs out and freeze: $ docker-compose run web xvfb-run -a bundle exec rspec I can't find any many informations

Communication between containers in docker swarm

霸气de小男生 提交于 2019-12-10 20:46:46
问题 I would like to communicate between master and worker nodes via WebSocket connection in docker swarm mode. A master node should have been reached from the worker node. The connection fails. Also, I would like to connect via http to the master node from my host machine. The connection fails as well. Here is my docker-compose.yml version: '3' services: master: image: master build: context: . dockerfile: ./docker/master/Dockerfile env_file: - ./config.env command: ['node', './src/master/'] ports

Error when running Keycloak in Docker

假装没事ソ 提交于 2019-12-10 20:15:00
问题 I am trying to run Keycloak in Docker, but its throwing an error. Here's the docker file: FROM jboss/keycloak:4.1.0.Final WORKDIR /opt/jboss/keycloak COPY realm-export.json initial_data.json RUN ./bin/standalone.sh -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=initial_data.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING I am using that realm-export.json file because I have some configurations there. And the error that is showing is