docker-stata ยท Stata container images

Choose a container image

Choose a Stata version, edition and flavor, and this page writes the pull command, a starter Dockerfile (or Compose, Podman or Apptainer/Singularity file) and the commands to build and run it on Linux, macOS or Windows. Only images that actually exist are offered.

What is a container?

A container image packages an operating system, Stata and everything around it into one file that runs the same way on any computer with Docker (or Podman, or Singularity). Pinning an image tag (e.g., `2026-08-12`) pins the whole computing environment, which makes automated runs and replication packages reproducible. See the Carpentries introduction to Docker to learn more.

The images are published on Docker Hub under sscng; the build scripts and full documentation are in the docker-stata repository. The images contain Stata binaries © StataCorp, posted with permission without a license: you need a valid Stata license, mounted at run time, to use them.

Image

Choose the edition your Stata license is for. A Basic Edition license needs a -be image, Standard Edition -se, and MP -mp. The license file you mount at run time must be compatible with the binary that is included. You can run a longer-ranked edition. It is also possible to run a Stata from a version older (lower) than the one your license is for.

How the images are named, and what the tags mean

An image name is built from its parts:

sscng/stata19_5-se-i:2026-08-12

Version
The Stata version. A point release is written with an underscore: 19_5 is Stata 19.5, i.e. StataNow 19, shown as “Now 19” above. It is newer than 19.
Edition
-be Basic, -se Standard, -mp MP-Parallel. This must correspond to your license. The MP images were built with the 32-core edition. Stata 18 and earlier versions were also published as a single image per version, containing all editions and no edition suffix.
Flavor
No suffix: command line only, no help files. This is the smallest image, made for automated runs. -i: adds the help files, for interactive work. -i-python: the -i image with Python installed (larger). -x: adds the GUI binaries but not the X11 libraries they need, so it only works as the base of your own image.
Tag
The born date of the Stata release. Stata updates its distribution on a regular basis. A dated tag never changes, so pulling it again later gives exactly the same image. Dated tags should be used for reproducibility. latest tags only exist as a convenience for older Stata versions that no longer obtain updates from Stata.
Pull the image
Start a Dockerfile

Build and run it

Save the file above in your project folder, next to main.do and code/setup.do, then run these commands from that folder. The Stata license is never copied into the image. During the build it is passed as a secret, so setup.do can install packages. At run time it is mounted read-only.

Commands