Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Tuesday, May 14, 2019

Failed to start Docker Application Container Engine





https://github.com/moby/moby/issues/16137



Solution:

It seems the problem is in the cyclane protection
need to ask the IT infra team to whitelist the docker container.shim and runc as part of docker installation.


Thursday, April 4, 2019

Packt tutorial

Docker GUI
https://www.youtube.com/watch?v=8OuqJtIpUnw

Installing Jenkins with Docker in new approach

Install Jenkins

  • Running Jenkins as a Docker container
  • Interacting with the Docker host from Jenkins

$ docker volume create jenkins

To identify docker group id
$ getent group docker
docker:x:998:vagrant

Run the container and to save the jenkins configuration into jenkins volume
$ docker run -v jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --group-add 998 --name jenkins dockerhp/jenkins


$ docker run -v jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --group-add 998 -d --name jenkins dockerhp/jenkins 

To figure out the ip address of jenkins
$ docker inspect -f '{{.NetworkSettings.Networks.bridge.IPAddress}}' jenkins
172.17.0.2

To view the secret password
$ docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword


Install plugin
Git plugin

Tuesday, March 19, 2019

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297


docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.


workaround:
use vagrant bento version instead of official ubuntu !!!


Thursday, August 30, 2018

Permanent aliases

Sometimes typing docker-compose up is too long to type. The best to make it shorter is to create aliases like alias ll="ls -al" but this is only temporary.

To make it a permanent aliases edit the ~/.bashrc and add the following
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dbup='docker-compose up -d db'
alias up='docker-compose up app'
alias stop='docker-compose stop'
alias re='docker-compose restart'
alias logs='docker-compose logs -f --tail 10'





refresh

source ~/.bashrc

Eureka!

Monday, August 27, 2018

Monday, August 6, 2018

Jasper Server 2.0

In my previous post http://skytechguyver.blogspot.com/search/label/Jasper I was able to run in docker and though it is running I think its lacking something.

And I found this link https://github.com/TIBCOSoftware/js-docker and I think this is the right way for my jasper server setup in my development machine.

The documentation is understandable except when I run the docker-compose. I got this error in a jasperserver-pro name because when you download the zip file from https://community.jaspersoft.com/project/jasperreports-server/releases the default name is already changed to jasperserver instead of jasperserver-pro.

The issue is fixed from this link
https://github.com/TIBCOSoftware/js-docker/issues/6

Overall, it was awesome I can run localhost:8080/jasperserver

So, right now I want to try to download the latest jasperserver 7.1.0 and add into resources and build again the docker.


Monday, June 18, 2018

vagrant provisioning thing...

last time I got this error installing docker and docker-compose during the vagrant up.

Ta dang!

config.vm.provision :docker
config.vm.provision :docker_compose


Reference:
https://github.com/leighmcculloch/vagrant-docker-compose

Sunday, February 25, 2018

Setup vagrant but cannot ping other network ip address “Destination Host Unreachable”

I spend many days to figure it out my problem in Vagrant. After I posted my question in stackoverflow, nobody is helping me instead they downvoted my post.

https://stackoverflow.com/questions/48899409/setup-vagrant-but-cannot-ping-other-network-ip-address-destination-host-unreach

Sad! really sad. :( curse you!!!


But anyway, I solved it in my own way. I found this article below
https://github.com/moby/moby/issues/27818

It's simply my docker IP address clashed with my company IP address because when you create the container by default it will create 172.18.xx.xx IP address. Boom! Destination unreachable.... blah blah.

So, I just create a custom docker network and when I checked it created IP address that start 172.19.xx.xx

$ docker network create --driver=bridge --subnet=172.20.0.0/16 --gateway=172.20.0.0 vbroker-network-v1

updated 2018-0720:
docker network create --driver=bridge --subnet=172.28.0.0/16 --gateway=172.28.5.254 vbroker-network

then in the docker-compose.yml, just added
networks:
  default:
    external:
      name: vbroker-network



Eureka!



Thursday, February 8, 2018

the right way to write docker-compose, charing!

version: '2'

services:

  odoo:
    image: odoo:9
    container_name: myevo_odoo
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./myevo_odoo_addons:/mnt/extra-addons
    environment:
      - PYTHONUNBUFFERED=1
      - user=odoo
      - password=odoo
  db:
    image: postgres:9.5.10
    container_name: myevo_db
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
  odoo-web-data:
  odoo-db-data:

Thursday, January 25, 2018

Next level Kubernetes

I was thinking to learn something new today and I've got this feeling to take a look again with Kubernetes.

I found this tutorial that is very good and he demonstrates from start zero to finish.

Here's the link
https://www.youtube.com/watch?v=b_fOIELGMDY


updated: 2/11/2018
https://www.youtube.com/watch?v=gpmerrSpbHg

Sunday, January 14, 2018

Docker issue


1. I had experience once in a blue moon and there's nothing way than to stop/start the docker service. Viola!

Issue:
Error response from daemon: cannot stop container: odoo9: Cannot kill container 0a08b9aefcaa2db053330cbd2b80591a81e68e4027cf6183338fc2700dd940bb: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused": unknown



solution:
sudo /etc/init.d/docker stop
sudo /etc/init.d/docker start





2. When I tried to run latest odoo11 and postgres 10 using docker-compose , I knew I perfectly copied from my configuration in odoo 9 setup but when I hit enter. Bang! issue found.
After a few googling for answers, I think there's some problem with volume. I guess. :)

Issue:

psycopg2.OperationalError: FATAL:  password authentication failed for user "odoo"


Solution:
docker volume rm malphi_malphi_odoo-db-data

Reference:
https://stackoverflow.com/questions/29580798/docker-compose-environment-variables




3. When I installed a new fresh centos environment in vbox. Everything is new, even docker :)
I have this issue everytime I open the virtual box that docker is not running.


Solution:
sudo systemctl start docker
sudo systemctl enable docker

Reference:
https://docs.docker.com/install/linux/linux-postinstall//

Friday, January 12, 2018

Print output does not reflecting in the log

It took me a couple of days just to figure out this problem. I know its a simple as you think but I'm wondering why can't show the print output in the log.

For many test attempt that I have done, I finally figure it out.

Simple.

environment:
      - PYTHONUNBUFFERED=1

that's it, just add this to docker-compose yml file.
Eureka!

Tuesday, December 19, 2017

Docker Networking

Lately I have a problem and yet to be solve. It's related in docker networking I guess.

When I try to run Odoo connect to Postgres using the docker-compose it will run successfully but the problem here is that I couldn't longer connected to my network ip address. If I connect our Odoo UAT as 172.18.6.180:8069 it failed as in FAILED!

After reading a LOT of article about the issue still I can't figure it out. But, I learn a few things about the docker network. Some of it , like below list.

1. Talk about bridge network - https://github.com/docker/labs/blob/master/networking/A2-bridge-networking.md


Running Tomcat and PostgresSQL in Docker



https://blog.lukaspradel.com/dockerizing-a-tomcat-postgresql-java-web-application/

https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/

Monday, December 18, 2017

Friday, October 13, 2017

More on Docker machine...


http://support.divio.com/local-development/docker/how-to-use-a-directory-outside-cusers-with-docker-toolbox-on-windows




Thursday, October 12, 2017

Docker machine make it work


delete
$ docker-machine rm default

create
$ docker-machine create --driver virtualbox dev

mark as active
$ eval $(docker-machine env dev)

free online comma separating tool

https://delim.co/#