Tag: docker

Kubernetes multi-tier container application

I have two Docker containers running Flask and redis each that communicate well when linked using Docker container linking. I am trying to deploy the same on Kubernetes using services and pods but, it’s not working. I am learning Kubernetes so I must be doing something wrong here. Below are the Docker commands that work […]

Docker and Namespace-related errors after a successful login to Bluemix

I have installed Python (with Pip and easysetup), Cloud Foundry and ICE in my host machine, OS X 10.10.3. I’ve booted boot2docker and attempted to ice login. After a successful login attempt: mbp-idan:~ idanadar$ boot2docker up Waiting for VM and Docker daemon to start… .o Started. Writing /Users/idanadar/.boot2docker/certs/boot2docker-vm/ca.pem Writing /Users/idanadar/.boot2docker/certs/boot2docker-vm/cert.pem Writing /Users/idanadar/.boot2docker/certs/boot2docker-vm/key.pem Your environment variables […]

Managing mysql users in a Docker environment

My goal is to create the following: one nginx container as a single entry point which will load balance amongst N node containers (APIs). one MySQL container (ultimately I will run replicas as well, not sure if this is related the problem). many API containers that will connect to the mysql container Based on my […]

Jenkins build parameter not working in quotes

I’m trying to issue a jenkins shell command with docker looks like this: docker run -v ${env.param1}:/workspace –privileged=true app sh -c ‘python app.py –option ${env.param1}’ …and the result looks like this: docker run -v actual.param1:/workspace –privileged=true app sh -c ‘cd folder && python app.py –option ${env.param2}’ The first environment parameter ${env.param1} is successfully replaced with […]

How to edit files inside a docker container?

I cloned the docker–sinatra from Github (https://github.com/tcnksm-sample/docker-sinatra). Built the image using: sudo docker build -t sinatra . Run the container: sudo docker run -d -p 4567:4567 sinatra Everything works fine. Now I want to change the content of the application file inside the container. I tried to attach the container and open the application file […]

Define application properties on build using Spring Boot and Maven

I have a spring boot application that uses a database. I have the local configuration in the application.properties file. I understand it is possible to change the values when I build the project with maven. I want to set the production values (db on AWS). Here is application.properties spring.datasource.url=${db.url:jdbc:postgresql://localhost:5432/mydb} spring.datasource.username=${db.username:localusername} spring.datasource.password=${db.password:localpassword} I would like to […]

HTTPS URL Redirecting not working with HaProxy

I have two domain that each support HTTP and HTTPS – I want to redirect them to the proper ports / servers. The following config works for HTTP but not HTTPS global log local0 log local1 notice chroot /var/lib/haproxy user haproxy group haproxy # daemon defaults log global mode http option httplog option […]

HHVM inside Docker and MySQL (outside) on host

I setup HHVM inside Docker on cPanel server with this configuration: http://wiki.mikejung.biz/HHVM Section – “How to run HHVM in a Ubuntu docker container on cPanel” My Docker configuration is: “Name”: “/sad_wozniak”, “NetworkSettings”: { “Bridge”: “docker0”, “Gateway”: “”, “IPAddress”: “”, “IPPrefixLen”: 16, “MacAddress”: “02:42:ac:11:00:0d”, “PortMapping”: null, “Ports”: { “9000/tcp”: [ { “HostIp”: “”, “HostPort”: “9000” and […]

Docker inspect with unix:///var/run/docker.sock (in Java or Scala)

Docker has lots of interesting information available via unix:///var/run/docker.sock I have been able to map this to a port and I can access /containers/json with GET requests to the port. But… this is not exactly secure. How can I access /containers/json from this raw socket file (in Java or Scala)?

ebean-orm.xml not reloading after change

I’m using Play Framework 2.3.8 and Ebean ORM. I have to mention that the server runs from a Docker Container. I created ebean-orm.xml file for mapping entities. But this file is not reloading after making changes and restarting the server. Why is this happening? Thank you My build.sbt name := “””app””” version := “1.0-SNAPSHOT” lazy […]

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