How can I containerize an application that I already have downloaded on my host computer?

Hopefully someone can point me in the direction of a tutorial/training because I’m struggling to find one. How do I create an image/container for a program on my computer, such as Microsoft Word for example? I’ve followed the “Containerize an application” tutorial on Docker’s website, but it says you need the app’s source code on your machine, which I don’t believe I’d have access to for your typical program.

Generally, you need to create an image, ideally build from a blueprint called Dockerfile. The Dockerfile specifications illustrate the usage of each instruction, but it will not tell you what needs to done to create a specific image. The whole blueprint needs to automate the installation, there is no way to use a desktop or an interactive console during image build. This is something you need to work out by yourself.

You mentioned Microsoft Word, which implies two things: you want to create a Windows container image, and the containerized application should be a gui desktop application. While creating Windows container images is possible, it is not for gui desktop applications. Even if you manage to create an image, there is no way to render the desktop application.

Containers are more aimed towards backend applications, which expose their services through network ports.

1 Like