Tag: docker compose

Docker (NGINX, PHP, mySQL) and Windows – File Permissions

I’ve been looking into docker for a few hours; I’m running Windows 8.1 as the host machine, and VirtualBox with boot2docker. This is my docker-compose.yml: mysql: image: mysql ports: – “6603:3306” environment: MYSQL_ROOT_PASSWORD: mysql MYSQL_USER: mysql fpm: image: php:7.0.2-fpm volumes: – /c/Users/Administrator/www:/var/www/html ports: – “9000:9000” links: – mysql nginx: image: nginx ports: – “80:80” – […]

kafka zookeeper docker no connection

I am new to docker-compose. I try to run: https://github.com/wurstmeister/kafka-docker with an adapted docker-compose.yml file: https://github.com/geoHeil/sparkplay This is the output of docker-compose ps. Name Command State Ports —————————————————————————————————————– docker_kafka_1 /bin/sh -c start-kafka.sh Up 0.0.0.0:32780->9092/tcp docker_kafka_2 /bin/sh -c start-kafka.sh Up 0.0.0.0:32782->9092/tcp docker_kafka_3 /bin/sh -c start-kafka.sh Up 0.0.0.0:32781->9092/tcp docker_zookeeper_1 /bin/sh -c /usr/sbin/sshd … Up 0.0.0.0:32779->2181/tcp, 22/tcp, 2888/tcp, […]

Why does the Symfony URL generator in PHPUnit point to localhost?

I am using Symfony 3 with PHP 5.6 and I have setup a unit test with PHPUnit which makes an request to a controller: $this->client->request(‘GET’, ‘/api’); The controller at URL /api makes several Curl requests concurrently to the local web server. With something like: do_http_requests([ $this->get(‘router’)->generate( ‘route’, $params, UrlGeneratorInterface::ABSOLUTE ), … ]); This fails because […]

How to dockerize two applications talking to each other via a http server?

TL;DR How can we setup a docker-compose environment so we can reach a container under multiple, custom defined aliases? (Or any alternative that solves our problem in an other fashion.) Existing setup We have two applications† (nodejs servers), each behind an HTTP reverse proxy (Nginx), that need to talk to each other. On localhost, configuring […]

postgres table does not exist from using docker-compose

I coded a simple server that uses postgres as DB. It was working when It’s not using docker but when it’s dockerized and orchestrated using docker compose, I couldn’t insert data in because table doesn’t not exist. I did check the DB in the container and it was there. The following are my setup and […]

Get the external Container Id to the Go Template

My following setup is a docker container in which a golang app runs. I work with the Scratch container to get one of the smallest containers. In my Go application I have some templates and the templates contains AngularJs etc. Anyway, the templates want to call REST-Routes based on the Go server. But how can […]

`docker rmi` tries to delete image with empty string (that does not exist)

When I’m trying to delete any of my images, docker does that thing : $ docker rmi 5aeb37c1fd00 Error response from daemon: image ID ” is invalid Error: failed to remove images: [5aeb37c1fd00] as you can see, it is complaining about an image with empty string name that it cannot delete. If it matters, my […]

how could I add user permission parameter into docker-compose

I want to adapt this command into docker-compose.yml docker run -d -v /Users/eric/workspace/apache-spark-playground/es_datastore:/usr/share/elasticsearch/data –user 1000:50 elasticsearch:2.1.1 How should I modify the following yaml sample elasticsearch: image: elasticsearch:2.1.1 hostname: elasticsearch ports: – “9200:9200” volumes: – ./es_datastore:/usr/share/elasticsearch/data

how to make fail2ban read json docker logs

Is it possible to configure my fail2ban jail.conf to inspect the docker logs instead of mounting the log in the host. for example to set the logpath to the path of the log of the container. Jail.conf: … #example [nginx-http-auth] enabled = true filter = nginx-http-auth port = http,https logpath = /var/lib/docker/containers/819564257d4*/*e0923e-json.log … but this […]

Translate docker run command to docker compose

I’m losing my mind a little here, I think I’ve translated the command correctly, but I’m getting an error when I try docker-compose up -d Here’s my command, this works – without failure: sudo docker run -i \ –hostname localhost \ –publish 444:443 –publish 8080:8080 –publish 23:22 \ –name gitlab \ –restart always \ –volume […]

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