# Cross Compiling with Docker on WSL 2

DevFeed: [Cross Compiling with Docker on WSL 2](<https://devfeed.tech/articles/cross-compiling-with-docker-on-wsl-2-27443.md>)

Original publisher: [Read original article](<https://ariya.io/2019/06/cross-compiling-with-docker-on-wsl-2/>)

Published: 2019-06-30T21:24:51Z

Content type: tutorial

Language: en

Sources: [Ariya Hidayat](<https://devfeed.tech/sources/ariya-hidayat.md>)

Topics: [Windows Subsystem for Linux](<https://devfeed.tech/topics/wsl.md>), [Cross-Compilation](<https://devfeed.tech/topics/cross-compilation.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [qemu](<https://devfeed.tech/topics/qemu.md>), [C](<https://devfeed.tech/topics/c.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>)

Tags: [arm](<https://devfeed.tech/tags/arm.md>), [c](<https://devfeed.tech/tags/c.md>), [containers](<https://devfeed.tech/tags/containers.md>), [cross-compilation](<https://devfeed.tech/tags/cross-compilation.md>), [docker](<https://devfeed.tech/tags/docker.md>), [qemu](<https://devfeed.tech/tags/qemu.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>), [windows](<https://devfeed.tech/tags/windows.md>), [wsl](<https://devfeed.tech/tags/wsl.md>)

## AI overview

This tutorial explains how to use Docker on WSL 2 to cross-compile a simple C program for ARMv7. It uses Dockcross for Docker-based cross-compilation, QEMU to run the resulting ARM binary, and briefly describes targets including MIPS, PowerPC, Windows, and WebAssembly.

## Source excerpt

Now that WSL 2 packs a true Linux kernel and supports Linux containers (via Docker), it can be a perfect setup to perform application cross compilations.