Mount Windows folder to Boot2Docker VM

I just stumbled over a post on Stackoverflow ( with the question how to mount a Windows folder to a Boot2Docker VM. Although the steps are a little bit confusing, in the end it is not difficult to do.


Boot2Docker is a simple VM to run Docker. The VM will run on VirtualBox and Boot2Docker is just a tool to provision this VM (very similar to Vagrant, but smaller and customized for using Docker). You simply download and install Boot2Docker and run boot2docker up to start the VM. After the VM is up, you can run boot2docker ssh to login. Now, we can start to get our Windows folder.

Mounting the folder

To use one of your Windows folders in your Boot2Docker VM, you need to mount it. To do so, you mount your Windows folder to the VM:

Now you login to your VM via SSH (with boot2docker ssh) and do the following:

Make a folder inside your VM:

Mount your stuff from Windows:

After that, you can access c:/my/folder/with/code inside your Boot2Docker VM:

Now, that your code is present inside your VM, you can use it with Docker. Either by mounting it as a volume to the container:

Or by using it while building your Docker image:

Best regards,

ORA-28001: the password has expired

Today I came about a very annoying exception. After my development setup was running smoothly for the last six months, my application was getting database errors today. I know that I didn’t break something, so the problem had to be somewhere else – and it was: ORA-28001: the password has expired

If you install an Oracle database on a Windows system, the default password policy will make all passwords expire after exactly six months! Great. So here’s how to fix that:

Best regards,

Basic Auth log-out with JavaScript

Whenever you have a log-in on your site, the chance is high that you also want to have a log-out. The easiest way to do a log-in is to use HTTP’s Basic Auth. But how to do a log-out with Basic Auth?

Basic Auth credentials are cached until the browser is closed

The problem with logging out from Basic Auth is simple: the browser will cache your credentials by default until the browser windows is closed. There is no standard mechanism to invalidate them. So Basic Auth doesn’t allow a log-out!

The dirty hack

However, there is always a dirty hack and this one goes like this: Instead of logging out, we do the opposite and try to do another login. But this time, we use a wrong user/password which will cause a 401 Unauthorized exception in our browser. But more important, it will replace our authenticated user with the new (and wrong) user in the cached Basic Auth credentials of our browser. After that, we are effectively logged out!


Best regards,