Tag: dockerfile

What shall I give the ip adress of redis container to which tomcat will connect through source code Docker volume

I am a beginner in docker. My source code has a properties file inside xyz volume where I have to mention redis ip address and password. Here tomcat is unable to connect to redis This is my docker-compose.yml version: “2” services: tomcat: container_name: tomcat build: ./tomcat ports: – “8080:8080” env_file: – ./tomcat/tomcat.env networks: – srikant-network […]

Vagrant docker provider slow build

I am trying to use Vagrant with docker provider on windows machine. I have Vagrantfile like this: ENV[‘VAGRANT_DEFAULT_PROVIDER’] = ‘docker’ Vagrant.require_version “>= 1.6.0” VAGRANTFILE_API_VERSION = “2” Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define “app” do |app| app.vm.provider “docker” do |d| d.name = “app” d.build_dir = “.” d.vagrant_machine = “dockerhost” d.vagrant_vagrantfile = “./DockerhostVagrantfile” end end end Docker host definition […]

How can write Dockerfile to start a webserver and curl it for some requirements

I’d like to use this dockerfile naively. FROM test/tomcat ENV CATALINA_HOME /tomcat RUN ${CATALINA_HOME}/bin/catalina.sh start RUN wget localhost:8080/Writer/WriterServlet The result is as follows certainly docker build –no-cache=true – < Dockerfile Sending build context to Docker daemon 3.072 kB Sending build context to Docker daemon Step 0 : FROM test/tomcat —> 2a85ccb3dd07 Step 1 : ENV […]

Docker set ipaddress and start services

I have setup docker and create container but problem is i want to bring up on my LAN IP subnet, I have configured docker0 has bridged and start docker -d -b docker0, Now i want to start container with static IP and start httpd and mysqld services. Dockerfile: FROM centos/centos6-latest RUN /sbin/ifconfig eth0 192.168.1.150 RUN […]

create web app with php and docker

I have the following DOCKERFILE: FROM php RUN apt-get update && apt-get install -y git RUN git clone https://github.com/marcosh/webinthemiddle.git EXPOSE 80 CMD php -S localhost:80 webinthemiddle/index.php that I would like to use to create a very basic app with php. I build the image using sudo docker build -t marcosh/webinthemiddle . and then I tried […]

Not able to access Kibana running in a Docker container on port 5601

I have built a docker image with the following Docker file. # gunicorn-flask FROM devdb/kibana MAINTAINER John Doe <user.name@gmail.com> ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y python python-pip python-virtualenv gunicorn # Setup flask application RUN mkdir -p /deploy/app COPY gunicorn_config.py /deploy/gunicorn_config.py COPY app /deploy/app RUN pip install -r /deploy/app/requirements.txt WORKDIR /deploy/app EXPOSE […]

Docker link container – environment variables not being displayed

Hello I am trying to link my containers following this guide: https://docs.docker.com/userguide/dockerlinks/ I run docker run -d –name mongodb devops-mongodb Then I run docker run -d -P –name rest-api –link mongodb devops-rest-api To link my mongodb container to the rest-api container. Then the documentation told me to do this to view the environment variables: docker […]

cant add cAdvisor application metric to Grafana

im using nginx inside a docker. And following these instructions to keep track my nginx metrics with cAdvisor. https://botleg.com/stories/monitoring-docker-swarm-with-cadvisor-influxdb-and-grafana/ I can show metrics inside cAdvisor application metrics tab. But cant find how to add these to Grafana. While trying to add row of this data my label wont show as “from source”. Here is how […]

Docker/Dockerfile: Using ENTRYPOINT for git clone

I am trying to run a git clone command inside my Dockerfile as entrypoint so that it is not cached and I am guaranteed to have the most up to date source code. Currently I have the following code in the Dockerfile: FROM ubuntu:trusty MAINTAINER Fernando Mayo <fernando@tutum.co>, Feng Honglin <hfeng@tutum.co> # Install packages ENV […]

Connecting to Docker container connection refused – but container is running

I am running 2 spring boot applications: A client and rest-api. The client communicates to the rest-api which communicates to a mongodb database. All 3 tiers are running inside docker containers. I launch the containers normally specifying the exposed ports in the dockerfile and mapping them to a port on the host machine such as: […]

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