Docker cheat-sheet

Docker is great for development, but also, it gives you the superpower of extremely small images to easily move around docker containers.

I need this for personal stuff, but I think it can be useful to others, so let’s share it.

It’s a living list so I’m gonna add here stuff as soon as I need it.

Foreplay (Composer) – a.k.a. Install fest
#Install composer:
sudo apt-get -y install python-pip
sudo pip install docker-compose
Images
#Build an image from a dockerfile in pwd:
docker build --rm=true -t tagname .
#--rm=true -> Remove intermediate containers after a successful build
#-t, --tag=[] -> Name and optionally a tag in the 'name:tag' format
#-f, --file -> Name of the Dockerfile (Default is 'PATH/Dockerfile')
Docker Composer
#Start a container with:
docker-compose up -d
#up -> Create and start containers
#-d -> Detached mode: Run containers in the background,
       print new container names.
       Incompatible with --abort-on-container-exit.
Containers
#Check what's running:
docker ps

#Stop container:
docker stop {containerid}

 

 

[personal log] Tomcat 6 with apache2 as reverse proxy on one or more Virtual Hosts

Tomcat-logo.svg
As reported on the my other article about Hippo Open Source CMS i will start a fresh install of tomcat 6.

If you need to do the same as me, read on this article until the end.

First thing to do is to remove the tomcat6 installation made by using aptitude.
Continue reading “[personal log] Tomcat 6 with apache2 as reverse proxy on one or more Virtual Hosts”

Incoming search terms:

  • localhost8080/sitetest2 (1)

Exploring Open Source CMS: Hippo

Hippo-cms-logoI’m going to test out some relevant Content Management System from the Open Source planet. This time i will try to install and configure Hippo Cms. Since I already tried almost all famous CMS written in php, this time we will take a look to this one, written in Java.

About Java: first time i came to speak about Java, a tremendous miskate was made. In fact while my interlocutor was speaking about Java as a Server-sided tech, i was speaking about the client part, the one i don’t like at all, and actually all considered, is slow, subject of contiuous updates, quiet bothering i mean. And my recentest memory about this is the callcenter dudes who had to manage oracle forms through a java web GUI: a nightmare!.

Anyway, as we all know, “the good is oft(en) interred with their bones“… so let it be with java for clients and let’s start seeing what do I need in order to start serving jsp from my machine. Continue reading “Exploring Open Source CMS: Hippo”

[Easy] How to change ISPConfig Admin password

ispconfiglogoHere is How to change the ISPConfig Admin password from MySql using phpmyadmin or normal logged in mysql user from console.
This is a very small but effective article because sometimes, when you have several machine to manage, it can happen that you just can’t remember that password that moment.
Continue reading “[Easy] How to change ISPConfig Admin password”

Incoming search terms:

  • ispcONFIG FORGOTT ADMIN PASSWORD (1)

Domain Names Registrars:Internetbs.net VS Misterdomain.eu.

icann-logoLet’s review two of the Domain Name Registrars i’v used so far:
Internetbs.net VS Misterdomain.eu: How do they do?

Why this post:
( I have to wait because the dns record of one of the sites I’m working on (http://diydrones.giuseppeurso.net) has not been propagated yet. I use two registrars for domain names (actualy i use two of them because i’m switching on the second…): Misterdomain.eu and Internetbs.net. Continue reading “Domain Names Registrars:Internetbs.net VS Misterdomain.eu.”

Incoming search terms:

  • internetbs net (1)

Securing WordPress (or any site) with fail2ban: prevent vuln scanners, flood and bruteforce attack

fail2ban-stopping-scannersHow to secure WordPress using advanced tools like fail2ban.

EDIT

This rules can cut out search engines from your server and they can affects all the sites hosted on the machine you are working on. I’m writing this because at the end it turned out that a better solution to prevent distribuited flooding is to use iptables with custom rules.

Fail2ban is one of my favourite server securing software, because it not only protects against several consequences deriving from being attacked by some script kiddy, but it saves a lot of system resources otherwise wasted serving pages to bots or similar.
I just discovered an annoying and repeated access log entry on my access logs wich leads to a 403/404 (i faked a little tso it makes sense for this article) error page (forbidden) and then i decided to let a specialized software do the job instead of using wordpress plugin, wich ,would act at a php/mysql level having to generate each time server headers, and here again, wasting server resources.

Some of these log entries looked loke this: Continue reading “Securing WordPress (or any site) with fail2ban: prevent vuln scanners, flood and bruteforce attack”

Incoming search terms:

  • fail2ban web server 400 filter (1)

ISPConfig3 client website CustomLog access log goes into other_vhosts_access.log

rounded_codeThis is a fast but durable and stable solution
The problem:

Client wesites on one of my ISPConfing Web Servers (actually I have to check the others yet) started or, better, stopped logging websites accesses into the expected access log file (the one into /var/log/ispconfig/httpd/blog.giuseppeurso.net/access.log), and start logging into the generic “other_vhosts_access.log” used for the “generic website” the one wich responds to all unmanaged virtualhost requests, the ones that comes by IP address instead of hostnames.

Ispconfig vhost config templates:

The solution is Continue reading “ISPConfig3 client website CustomLog access log goes into other_vhosts_access.log”

Free SSL Certificate to Ispconfig websites with Startssl – How to

ispconfiglogostartssl_logo
This article will go through the complete process in order to obtain, install and run an SSL Webserver Certificate for free with ISPConfig3 and Startssl dot com.
Some years ago i discovered this useful service for generating Class 2 webserver certificates, very useful to offer your user a secure, encrypted connection over wich they can send their data reducing the risks of being sniffed (i’ll write something about sniffing).
Continue reading “Free SSL Certificate to Ispconfig websites with Startssl – How to”

Incoming search terms:

  • ispconfig startssl (32)
  • ispconfig ssl certificate (23)
  • ispconfig website ssl Certificate (22)
  • instalar ssl in ispconfig (17)
  • where is folder www https ispconfig (16)
  • shared ssl ispconfig (15)
  • installing SSL for all ispconfig sub domains (9)
  • starssl ispconfig (3)
  • ispconfig SSL Bundle (1)
  • ssl con startssl (1)

Shineisp Installation Log / mini How to

Shineisp is an italian open source WHM (Web Hosing Management) and we are going to give it a try. I recall i alredy installed it last year, but the machine had a poor hardware and shineisp is a greedy MVC phpmysql program. For this “instalfiguration” we assume we are on Debian Squeeze and we will cover the steps needed to get shineisp up and running in 10 minutes.

Continue reading “Shineisp Installation Log / mini How to”