Docker is a user-friendly layer on top of LXC, a set of Linux kernel features allowing namespacing of filesystem configuration, network resources, process tables, and other kernel-mediated resources which were historically global. (It's much closer to FreeBSD jails than it is to kvm or VMware).
These features are very specific to Linux, and an application running in a Docker container is still interfacing directly with the host's Linux kernel (though it only has access to the subset of resources exposed to the namespaces in which it participates). Similarly, opcodes are run directly on the hardware with no emulation on virtualization in place, so hardware differences are not abstracted away either
Docker is thus not a cross-OS (or cross-architecture) portability layer, and it will not successfully hide implementation details from applications which depend on specific kernel versions, much less entirely different operating systems altogether.
Early 2017 Update
Docker now runs on Mac, by bundling a lightweight virtualization stack very similar to kvm on Linux. When running this way, it's actually doing both virtualization and containerization -- the former to run a (single) Linux kernel, the latter to run a series of separate containers within this kernel.
This still means that it's limited to running native Linux apps, and it still doesn't provide a display layer for desktop applications (X11, VNC, or something else along those lines needs to be used in addition). However, by bundling a virtualization tool, modern Docker now is something of a portability solution (across platforms, not architectures).