Tag: docker compose

Get the container ID when triggered from a docker file

How can I get the docker ID that just got deployed when triggered from the docker file? What I would like to do is add some command in the docker file which will provide the container ID of the instance that just got deployed: “Example echo $CONTAINERID” This will be further used for container maintenance. […]

Intellij docker integration plugin and invalid volume specification on docker-machine for windows 10

I’m trying to use intellij’s docker integration plugin with the following tutorial on Get started with Docker Compose running on a docker-machine installed on windows 10. My project is located here: C:\Users\bob\IdeaProjects\foo. If I run docker-compose up from the command line on my windows host, everything works. If I try to create a Docker deployment […]

Docker container connection to gateway refused

While setting up a php dev environment with docker, I ran into an issue while setting up remote debugging (XDEBUG) through a dbgp proxy. Connecting my host machine to the proxy doesn’t seem to be a problem, but the proxy container cannot reach my host machine over the port that is configured (in this case […]

docker-compose to access port on host machine

Ip of host machine is docker-compose file is as follows: version: ‘2’ services: zl-tigervnc: image: zl/dl-tigervnc:1.5 container_name: zl_dl_tigervnc restart: always tty: true ports: – “8001:8888” – “6001:6006” – “8901:5900” – “10001:22” devices: – /dev/nvidia0 volumes: – ~/data:/root/data – /var/run/docker.sock:/var/run/docker.sock extra_hosts: – “dockerhost:” A container was launched by this script. The container want to access […]

Docker – Install PDO Driver for PHP + Nginx

I have a Dockerfile: FROM php:7-fpm RUN apt-get update \ && apt-get install -y –no-install-recommends libpq-dev \ && docker-php-ext-install mysqli pdo_pgsql pdo_mysql Then I have in my docker-compose.yml file: web: image: nginx:latest ports: – “80:80” volumes: – ./frontend:/var/www/html – ./api:/var/www/html/api – ./nginx/default.conf:/etc/nginx/conf.d/default.conf links: – php mysql: image: mariadb ports: – “3306:3306” environment: – MYSQL_ROOT_PASSWORD=password – […]

Docker Swarm with TLS: Compose behaves strangely using DOCKER_CERT_PATH

I have two machines (Ubuntu Server 16.04) running a Docker Swarm cluster. On each machine runs: Docker 1.11.2 Consul 0.6.4 Docker Swarm Manager and Node swarm/1.2.3 Docker Compose 1.7.1 Everything is encrypted with TLS. I followed the instructions on https://docs.docker.com/swarm/configure-tls/#/step-9-configure-the-engine-cli-to-use-tls and added a .bash_profile inside my home directory: export DOCKER_HOST=tcp:// export DOCKER_CERT_PATH=/usr/local/share/ca-certificates export DOCKER_TLS_VERIFY=1 After […]

Django shell mode in docker

I am learning how to develop Django application in docker with this official tutorial: https://docs.docker.com/compose/django/ I have successfully run through the tutorial, and docker-compose run web django-admin.py startproject composeexample . creates the image docker-compose up runs the application The question is: I often use python manage.py shell to run Django in shell mode, but I […]

Filebeats doesn't foward Docker compose logs, why?

I am following this tutorial to set up a ELK stack (VPS B) that will receive some Docker/docker compose images logs (VPS A) using Beatfile as forwarder, my diagram is as shown below So far, I have managed to have all the interfaces with green ticks working. However, there are still remaining some issues in […]

Docker login auth token

I’m trying to get docker login auth from ~/.docker/config.json file. But I can’t see auth token in my config.json file. Here is my docker version. docker version Client: Version: 17.03.1-ce API version: 1.27 Go version: go1.7.5 Git commit: c6d412e Built: Tue Mar 28 00:40:02 2017 OS/Arch: darwin/amd64 Server: Version: 17.03.1-ce API version: 1.27 (minimum version […]

Docker-compose hanging on pulling image where Dockerfile doesn't

I’m having an interesting problem… would love any tips, suggestions, or pointers in the right direction. Not sure where to start with this one, really. Basically, we have a docker-compose.yml and Dockerfile. Dockerfile: FROM hypriot/rpi-node:7 # Create app directory RUN mkdir -p /usr/src/rrp-database WORKDIR /usr/src/rrp-database # Install app dependencies COPY package.json /usr/src/rrp-database RUN npm install […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.