Posts

Docker Swarm example voting app using redis, postgres and docker repo's

Networks: (overlay network we just use with swarm becuase it will allow us to span accross nodes) ======= docker network create -d overlay backend docker network create -d overlay frontend Vote: done docker service create --name vote -p 80:80 --network frontend --replicas 2 dockersamples/examplevotingapp_vote:before redis: docker service create --name redis --network frontend redis:3.2 worker: docker service create --name worker --network frontend --network backend dockersamples/examplevotingapp_worker db: done docker service create --name db --mount type=volume,source=db-data,target=/var/lib/postgresql/data --network backend postgres:9.4 result: done docker service create --name result -p 5001:80 --network backend dockersamples/examplevotingapp_result:before

Docker registry for Linux

Docker registry for Linux Parts 2 & 3 Feb 27, 2017  •  @manomarks Part 2 - Running a Secured Registry Container in Linux We saw how to run a simple registry container in Part 1, using the official Docker registry image. The registry server can be configured to serve HTTPS traffic on a known domain, so it’s straightforward to run a secure registry for private use with a self-signed SSL certificate. Generating the SSL Certificate in Linux The Docker docs explain how to  generate a self-signed certificate  on Linux using OpenSSL: mkdir -p certs openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt Generating a 4096 bit RSA private key ........++ ............................................................++ writing new private key to 'certs/domain.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what ...

RUN a local private registry

RUN the registry container with "registry image" # docker container run -d --name registry -p 5000:5000 registry Re-tag an existing image and push this image into your new registry  # docker image ls (to view images list) # docker tag hello-world 127.0.0.1:5000/hello-world # docker push 127.0.0.1:5000/hello-world Remove images from local cache and pull it from new registry # docker image rm hello-world # docker image rm 127.0.0.1:5000/hello-world # docker pull 127.0.0.1:5000/hello-world Recreate registry using bind mount (to run below command you might need to remove registry container) # docker container run -d --name registry -p 5000:5000 -v $(pwd)/registry-data:/var/lib/registry registry

Installation Jenkins, Java and Nginx on Ubuntu Machine

Installation Jenkins, Java and Nginx on Ubuntu Machine Install Jenkins: wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/source.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins Install Java 8: sudo apt install openjdk-8-jdk Insall NGINX: sudo apt-get update sudo apt-get install nginx