How to open .DOCKERFILE files (Docker build files) on Android, Windows and Linux
What a Dockerfile is and how to open Dockerfiles, Makefiles (.mk, .mak), CMake, Terraform (.tf, .hcl) and .nix files for free on Android, Windows and Linux.

Most Dockerfiles have no extension at all. The file is simply called Dockerfile, so Windows lists it as “File”, double-clicking it asks you to pick a program, and a phone may refuse to open it. Makefiles work the same way.
They’re all plain text: short recipes for building software or setting up servers. Folders opens a Dockerfile, a Makefile and the related build and infrastructure files in its text editor on Android, Windows and Linux, so you can read them or make a quick fix wherever you are.
What is a Dockerfile?
A Dockerfile is the recipe Docker follows to build a container image. Each line is an instruction: FROM picks the base image, RUN runs a command during the build, COPY brings files in, WORKDIR and ENV set the working folder and variables, EXPOSE documents a port, and CMD or ENTRYPOINT says what runs when the container starts. docker build . looks for a file named Dockerfile in the folder; other names, such as Dockerfile.dev or api.dockerfile, are passed with -f. Podman reads the same files and also accepts the name Containerfile.
A project with a Dockerfile usually has other build and infrastructure files next to it:
| Extension | What it is | Where you meet it |
|---|---|---|
Dockerfile, .dockerfile |
Steps to build a container image | Almost any project that ships as a container |
Makefile, .mk, .make |
Rules for make: targets, what they depend on, and the commands that build them |
C and C++ projects, Linux software, and repositories that use make as a task runner; .mk files are pulled in by a main Makefile |
.mak |
A makefile, often for Microsoft’s NMAKE | Older Windows C and C++ projects |
CMakeLists.txt, .cmake |
Build instructions for CMake, which then writes Makefiles or Visual Studio projects | C and C++ projects; .cmake holds modules and helper scripts |
.tf |
Terraform configuration | Cloud infrastructure described as code, for AWS, Azure, Google Cloud and others; OpenTofu reads the same files |
.hcl |
HashiCorp Configuration Language, the syntax Terraform uses | Packer templates, Nomad jobs, Vault settings, Terragrunt |
.nix |
The Nix package manager’s language | default.nix, shell.nix, flake.nix and NixOS’s configuration.nix |
How to open a Dockerfile with Folders
On Android:
- Install Folders from the download page and let it access your files.
- Browse to the project, or type
Dockerfileinto search. - Tap the file. It opens in the text editor.
- If someone sent it to you in a chat or an email, tap it there and choose Open with → Folders.
On Windows and Linux:
- Open the project folder in Folders.
- Double-click
Dockerfile,Makefileor any of the files above.
Folders recognises files named exactly Dockerfile or Makefile, as well as the extensions in the table. Variants such as Dockerfile.prod open in the text editor too, because Folders checks that an unfamiliar file is text before choosing how to open it.
On Windows, the installer adds Folders to File Explorer’s Open with menu for .tf, .hcl, .nix, .cmake, .mk and the other extensions, so right-click → Open with → Folders works for them. A file with no extension at all, like Dockerfile, is easiest to open from inside Folders.
What you can do with it in Folders
- Read with colours. Files with these extensions show
#comments, strings and variables such as$HOMEor${VERSION}in their own colours. A file simply namedDockerfileorMakefileopens as plain text with line numbers and word wrap. - Find and replace (with Match case): bump every
FROM node:18to a newer tag, or change a region name in all your Terraform resources. - Go to line.
makereports errors asMakefile:23: *** missing separator.and Terraform as “on main.tf line 12”, so you can jump straight there. - Document info shows the encoding and the line endings, LF or CRLF. Saving keeps them as they were.
- Open several files as tabs, say a Dockerfile, its
docker-compose.ymland a.env. - Edit and Save, with undo and redo, then copy the project back to your computer.
Folders doesn’t run Docker, make, Terraform or Nix. It shows and edits the text, nothing more.
Other ways to open Dockerfiles
- VS Code (free, Windows and Linux) with the Docker, HashiCorp Terraform or Makefile extensions, which add hints and checks.
- JetBrains IDEs understand Dockerfiles and HCL, directly or through plug-ins.
- nano or vim on a server, where these files often live.
Problems opening a Dockerfile?
- Windows asks which app to use. The file has no extension, so Windows has nothing to go on. Open it from Folders, or choose Notepad once.
makesays “missing separator”. Every command line under a target must start with a tab character, not spaces. An editor that turns tabs into spaces breaks the Makefile. Most phone keyboards have no Tab key, so recipe lines are easier to fix on a computer.- A container fails with “bad interpreter” or
^Min the error. A script copied into the image has Windows CRLF line endings. Document info shows them; convert the file withdos2unix, or add* text=auto eol=lfto the project’s.gitattributes. - CMakeLists.txt looks like an ordinary text file. It is one by name, and that’s fine: it opens in the same editor.
Questions people ask
How do I open a Dockerfile on Windows? Open it from Folders, or right-click → Open with and pick a text editor. Docker Desktop doesn’t open it for editing; it only uses it when you build.
What’s the difference between a Dockerfile and docker-compose.yml? A Dockerfile builds one image. A Compose file, written in YAML, starts one or more containers together and sets their ports, volumes and networks.
What is a .tfstate file, and can I open it? It’s Terraform’s record of what it has created, stored as JSON, and it opens as text. It can hold passwords and keys in plain form, so treat it as a secret and don’t edit it by hand.
What’s the difference between a Makefile and a .mk file?
The format is the same. Makefile is what make reads by default; .mk files hold shared rules that a Makefile pulls in with include.
Related guides: how to open YAML and TOML files and how to open shell scripts, or the full list of all 382 file types Folders opens.
Keep reading
How to open .C files (C and C++ source code) on Android, Windows and Linux
What .c, .h and .cpp files are and how to open, read and edit C, C++ and Objective-C source code for free on Android, Windows and Linux, with no IDE needed.
How to open .CS files (C# source code) on Android, Windows and Linux
What .cs, .csproj, .sln, .vcxproj and .xaml files are and how to open and edit C# code and Visual Studio projects for free on Android, Windows and Linux.
How to open .CSS files (style sheets) on Android, Windows and Linux
What CSS, SCSS, Sass and Less files are and how to open, read and edit style sheets for free on Android, Windows and Linux, with colours, search and replace.



