docker-compose

How to set Environment Variables from server in Docker Compose?

六眼飞鱼酱① 提交于 2019-12-11 04:11:49
问题 Is there a way to force docker compose to assume environment variables from the underlying machine? Background: I decided to play around with Docker in my ASP.NET Core Web Application, so I used the Add Docker Support option in Visual Studio, which created a .dcproj (Docker Compose project). Prior to that, I was reading some configs from Environment Variables on the current machine (either my dev machine or a server). I realized when I'm debugging with the docker compose project, I'm not able

Docker [for mac] file system became read-only which breaks almost all features of docker

旧街凉风 提交于 2019-12-11 04:06:46
问题 My Docker ran into an error state, where I cannot use it anymore. output of docker system info : Containers: 14 Running: 2 Paused: 0 Stopped: 12 Images: 61 Server Version: 18.03.1-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: error NodeID:

Dockerizing an application whose build process depends on communication with another container

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 04:04:00
问题 I have a Ruby on Rails app I'm trying to containerize so that I can deploy it with Docker: version: '3.4' services: db: image: postgres web: container_name: my_rails_app build: . ports: - "3000:3000" depends_on: - db As part of the existing build process for this application, there currently exists a script which starts up a test version of the application with a bunch of sample data and takes multiple screenshots of various features of the application to be used in help files. This script is

Docker-compose scale up Jetty with NGINX at runtime

☆樱花仙子☆ 提交于 2019-12-11 02:18:56
问题 I am new to docker. I have gone through few tutorial to create docker compose file to create 3 Jetty, 1 NGINX and 1 MySQL. NGINX is acting as LB with round robin mechanism.It is working good as expected. If I scale up my jetty instance ( by docker-compose scale jetty-one=2), container is created . But it is not coming under NGINX LB. I hope, I have hard coded in NGINX's configuration file upstream. please guide me and provide solution for adding Jetty instance under LB at run time without

docker-compose, export environnement variables are not working in Jenkins

扶醉桌前 提交于 2019-12-11 01:57:15
问题 I have a docker-compose.yml file with differents variables version: "2" services: data: image: "${registryUrl}/data:${image_version}" In my shell, I export registryUrl & image_version export registryUrl=zhcjie.distribution.ata.com:8652 export image_version=1.0-SNAPSHOT docker-compose up that's work in my local (I'm using boot2Docker) but it doesn't work in Jenkins. I have a wrong message. The registryUrl variable is not set. Defaulting to a blank string. The image_version variable is not set.

Docker Compose - symlink in deployment

走远了吗. 提交于 2019-12-11 01:52:41
问题 I have an application with this structure. /path/releases /path/releases/01012016 /path/releases/16012016 /path/releases/etc.. And /path/dev (symlink to some version) /path/stag (symlink to some version) /path/stable (symlink to some version) My docker-compose.yml looks like this: nginx: ... volumes_from: - data php: ... volumes_from: - data data: volumes: - /path/stable:/var/www I known that Docker resolves symlinks. I have thought before deploy I just recreate data container and it's ok.

In Docker, how do I share a volume from a container to a host?

帅比萌擦擦* 提交于 2019-12-11 01:36:11
问题 I know you can share a directory that exists on the host with a container using the VOLUMES directive, but I'd like to do the opposite--share the files that exist in the container with the host, provided that nothing exists in that directory on the host. The use case for this is that we have contractors, and we'd like to provide them with a docker container that contains all the code and infrastructure they need to work with, but that would allow them to alter that code by running PyCharm or

Docker swarm tries to parse the value of ENV variable in my compose file (because it has a go template in it) and gives me an error

时光怂恿深爱的人放手 提交于 2019-12-11 01:29:52
问题 The error I try to launch a logspout container and set the log format (an ENV variable) via a docker-compose file. Not too difficult, and if I launch it with docker-compose up , everything works fine. But when I try to launch it with docker swarm init and docker stack deploy -c docker-compose.yml mystack , I get an error: Error response from daemon: rpc error: code = InvalidArgument desc = expanding env failed: expanding env "RAW_FORMAT={ \"container\" : \"{{ .Container.Name }}\", \"labels\":

From where/how the files get populated in /var/www/html?

谁都会走 提交于 2019-12-11 01:14:17
问题 I am learning Docker and trying to understand volumes . Looking at this example of wordpress compose and its dockerfile I don't get which command is responsible for populating wordpress files into /var/www/html . I do see that there is VOLUME /var/www/html command in the dockerfile to create a mount point. There is command to download wordpress files and put in /usr/src/wordpress directory. But what I don't get is how does files get into /var/www/html ? Is it just that mounting to this

Connecting pgadmin to postgres in docker

左心房为你撑大大i 提交于 2019-12-11 01:08:29
问题 I have a docker-compose file with services for python , nginx , postgres and pgadmin : services: postgres: image: postgres:9.6 env_file: .env volumes: - postgres_data:/var/lib/postgresql/data ports: - "5431:5431" pgadmin: image: dpage/pgadmin4 links: - postgres depends_on: - postgres environment: PGADMIN_DEFAULT_EMAIL: admin@admin.com PGADMIN_DEFAULT_PASSWORD: pwdpwd volumes: - pgadmin:/root/.pgadmin ports: - "5050:80" backend: build: context: ./foobar # This refs a Dockerfile with Python and