19.06.2018

Docker: Network configuration - none / brigde / hostname / dns entries

If you are starting your docker container you can add some network configuration details via command line.
Let's start with the easiest network setting:
docker run -it  --net none alpine /bin/ash
This setting starts the container without any connectivity to the network:
# ip addr show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
The default is --net bridge:
docker run -it  --net bridge alpine /bin/ash
With this setting your network access is via a bridge of your host:
# ip addr show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
7: eth0@if8:  mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.2/16 scope global eth0
       valid_lft forever preferred_lft forever
This is the docker0 interface on your docker server machine:
alpine:~# ip addr show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:72:ae:ef brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.46/24 brd 192.168.178.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe72:aeef/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0:  mtu 1500 qdisc noqueue state DOWN 
    link/ether 02:42:ba:e9:4d:6a brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:baff:fee9:4d6a/64 scope link 
       valid_lft forever preferred_lft forever
4: docker_gwbridge:  mtu 1500 qdisc noqueue state DOWN 
    link/ether 02:42:62:f0:92:82 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 scope global docker_gwbridge
       valid_lft forever preferred_lft forever
Finally you can configure your hostname and manipulate dns entries:
# docker run -it  --net bridge  --hostname myhostname --add-host mygoogle.com:8.8.8.8  alpine /bin/ash
/ # hostname
myhostname
/ # nslookup mygoogle.com
nslookup: can't resolve '(null)': Name does not resolve

Name:      mygoogle.com
Address 1: 8.8.8.8 mygoogle.com

16.06.2018

Docker: How to limit memory usage

By starting your container you can limit the RAM usage simply by adding
-m 4M

(this limits the memory to 4 megabytes).

To check this simply run:

docker run -it -m=4M  --rm alpine /bin/ash

and on your docker machine check the following entry:

alpine:~# cat /sys/fs/cgroup/memory/docker/4ce0403caf667e7a6d446eac3820373aefafe4e73463357f680d7b38a392ba62/memory.limit_in_bytes 
4194304


06.06.2018

Oracle SOAR ?!

Larry Ellison announced yesterday Oracle SOAR:


Soar [https://en.oxforddictionaries.com/definition/soar]:  
Fly or rise high in the air.
‘the bird spread its wings and soared into the air’
It is about migrating into the cloud [press release]:
the world’s first automated enterprise cloud application upgrade product that will enable Oracle customers to reduce the time and cost of cloud migration by up to 30 percent. By providing a complete set of automated tools and proven cloud transition methodologies, the new “Soar to the Cloud” solution enables customers with applications running on premises to upgrade to Oracle Cloud Applications in as little as 20 weeks.

Oracle does not see a bird - Oracle SOAR is more like a rocket ;-)

But it is not for plain databases or application servers. It is only for E-Business Suite, PeopleSoft and Hyperion:
The Oracle Soar offering is available today for Oracle E-Business Suite, Oracle PeopleSoft and Oracle Hyperion Planning customers who are moving to Oracle ERP Cloud, Oracle SCM Cloud and Oracle EPM Cloud. Oracle will continue to invest in the development of the product, extending the solution to Oracle PeopleSoft and Oracle E-Business Suite customers moving to Oracle HCM Cloud, and Oracle Siebel customers moving to Oracle CX Cloud in the future.