Aug 21, 2016

Mounting a host directory into a docker container when you are using docker-machine on windows

I used docker before on my Fedora 23 laptop having some images for doing Development tests.

Now I have to use Windows 8.1 on my laptop. The docker toolbox is here a great help, to get a
docker engine on the windows host.

Docker Toolbox creates a Linux host in a VirtualBox VM.

To access the docker host, you have to set the environment in the shell:
docker-machine.exe env <Machine-Name> --shell powershell

This shows hints,on how to set the environment in a PowerShell to directly talk to the docker daemon.

Everything else on interacting with the container works like talking to a remote docker host.

The Docker Hub is a docker registry providing prebuilt images.
From there I used the MySQL-Image, which is providing a full MySQL DB. The data of the database
is stored in the container if you just start the image:

docker run -d --name mysql_local mysql
docker inspect mysql_local

shows you the configuration of the container. Somewhere in the output, you find, that the image
defines a volume, where you can redirect the content of the database to a local folder.

            "Image": "mysql",            "Volumes": {                "/var/lib/mysql": {}

On Fedora, I just used the '-v' option to mount a local directory of the laptop and I had the persistent
store, even on rebuilding the container, when using e.g. docker-compose.

With docker-machine from the Docker Toolbox, the data would be stored in the VM of Virtualbox.
When recreating the VM, the data would be lost.

There is one directory, the VM from the Docker Toolbox mounts automatically into the VM Linux:
C:\Users is mounted to /c/Users

Using e.g.:

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=db -e MYSQL_USER=spring -e MSQL_USER_PASSWORD=spring -e MYSQL_DATABASE=spring -P -v /c/Users/eer/docker_volumes/mysql_db:/var/lib/mysql mysql

allows you to mount a local Windows directory into the container and store the database.
You can also mount other directories, but  this needs manual steps in configuring the VirtualBox VM to share the directory and configure the VM Box Linux to mount it.

May 20, 2016

creating a link in windows for a directory

The apache cxf maven plugin does not completely honor the maven structure for generated sources.

Netbeans gives a hint in the project properties that generated sources should be placed under


The cxf-codegen-plugin places the sources for the customer projecct under generated and therefore
netbeans shows errors in the code.

Now windows also has the functionality to create links, but the command is only in cmd.exe and not
in the powershell.


mklink /J cxf ..\generated\cxf

My source for the mklink is from here.
In a cmd.exe does the trick and netbeans doesn't show any errors in the source code.

How to get the focus into a window without raising it into the front on windows 8

On my linux Gnome-Desktop I had the focus moving with the mouse ( no clicking ) and also not
raising the window.

E.g. you have a console in the background  and a window in front and just to type something in
the console without raising it was a simple example I used often.

There is a trick for windows, with some registry editing:

see here:

May 18, 2016

Accessing the Registry from the Powershell

With powershell it is possible to access the window registry directly from the commandline
with the default commands:


PS C:\Users\eer> cd HKLM:


Name                           Property
----                           --------
7-Zip                          Path : C:\Program Files\7-Zip\

setting environment variables in a powershell session

The powershell is the new replacement for cmd.exe.

To set variables you have multiple options:

setting the variable ew:

 Set-Item env:ew 'hallo'

or to set in an other way:

PS C:\Users\eer> $env:ANDROID_HOME='C:\DevTools\Android\sdk'
PS C:\Users\eer> $env:target='ewald'

May 13, 2016

executing a sql file in the local DB2-Database on Windows

First you have to start the DB2-Commandshell by executing db2cmd.exe from the BIN-Directory of the DB2-Installation.

In the DB2 Command shell connect first to the database: e.g

db2 connect to <database> USER <username>

db2 -tvmf <sql-File>

May 12, 2016

Changing the font size in ConEmu with -

ConEmu is a multiconsole window similar to tmux or screen.

It is very easy to in/decrease the font size of a command window, by just doing a
<ctrl>-<mouse-scroll> in any direction.

let windows 8 automatically show the desktop instead of the tiles

Right-Click on the taskbar and select the properties.

Select the options as you like. "When I sign in or close all apps on a scren, go to the desktop instead of Start" is the main option.

Now you always have the desktop.

How to shut down the maschine.

Press <windows>-x to get the menus.

May 11, 2016

How to follow a log file on windows? On all *nix-systems I just used tail

To follow a log file which is continuously updating you just use tail on any *nix-system.

But now I have to use Windows and what to do here. A nice colleague ( Wolfgang ) has already found such a tool. It's called SnakeTail.

You just open the log files and it is doing like tail to update the view by itself.

(an other log file explorer is glogg - ) .

language checking in skype, when you use different languages

Now I'm using a German keyboard, but write English text in Skype. So Skype checks what I
type and does a lot of corrections ( in the German sense ).

You can change this only by changing the whole windows settings.
Here is the link with the whole conversation about this.

The solving hint was this answer:

I had same problem.
Just set up 3 different keyboard, go control panel -> language (i use view by small icons) -> add language -> find your language -> then option on that language -> there click "add an input method" and choose your native keyboard layout (don't forgot remove native layout for that language  ).That's it. You can change language correction just by hitting win key + spacebar and autocorrection will change but your native layout will stay ^_^
enjoy the day!

May 10, 2016

quicktext addon doesn't work anymore with thunderbird 45

The quicktext addon doesn't work anymore with thunderbird 45.

The problem is discussed here. And somewhere in the discussions is a link to a patche xpi file
which solved for me the quicktext-addon-problem and it is now working again.

run a program as a different user in windows 8

I need to run an execueable as a different local user on windows 8.

The tip was found here.

start gpedit.msc and search for User Configuration\Administrative Templates\Start Menu and Taskbar. 

Here lookup Show “Run as different user” and enable it. 

After this start "gpupdate /force".

Now by pressing <shift> and rightclick on the executable you get an additional context entry to run as a 
different user. 

Lookup the user and insert it with <local domain>\<username> and the password.