QuickStart - Using ADMB Docker Linux Image

Released March 15, 2024

Details prerequisites and procedures to use the ADMB Docker Linux image for building and running ADMB models with the simple example.

ADMB Docker Linux Image

The ADMB Docker image uses the Debian 12.1 (Bookwork) as the base container.

Below is the list of tools that are preinstalled.

  • Compiler - GNU GCC version 13.2
  • ADMB - latest version


To use ADMB Docker Image for Linux, the operating system of host computer must be either Linux, MacOS or Windows.

For MacOS or Windows computers, click the Docker Desktop to run the Docker services on the local host computer.


Using the Docker Desktop, download the ADMB Docker Image or use the command below from the terminal.

   docker pull johnoel/admb-13.2:linux

For MacOS with ARM64 CPU host computers, download the docker image with the command below.

   docker pull johnoel/admb-13.2:linux-arm64


  1. Open a Terminal (or Command Prompt for Windows) and change to the model local directory.

     cd simple
  2. Builds simple.tpl into a Linux executable using the ADMB Docker Linux Image and the mounted current local directory.

    For Windows host,

     docker run --env LDFLAGS=-static --rm --volume %CD%:/simple --workdir /simple johnoel/admb-13.2:linux simple.tpl

    For Unix host,

     docker run --env LDFLAGS=-static --rm --volume $PWD:/simple --workdir /simple johnoel/admb-13.2:linux simple.tpl

    *Note*: A warning will be displayed for running AMD64 image on the Apple processor, but it will build and run model.

  3. Run simple Linux executable.

    The Linux executable is incompatible for MacOS and Windows platforms, but the Docker Linux Image can be used to run the program. See the Docker commands below.

    For Windows host,

     docker run --rm --volume %CD%:/simple --workdir /simple --entrypoint ./simple johnoel/admb-13.2:linux

    For Unix host,

     docker run --rm --volume $PWD:/simple --workdir /simple --entrypoint ./simple johnoel/admb-13.2:linux

    For Linux host, executable could be run locally.



The procedure below shows how to use the container’s interactive command line shell to build and run models.

  1. Use docker to open container’s interactive shell and mount current local directory to the container.

    For Windows host,

    docker run -it --entrypoint /bin/bash --rm --volume %CD%:/simple --workdir /simple johnoel/admb-13.2:linux

    For Unix host,

    docker run -it --entrypoint /bin/bash --rm --volume $PWD:/simple --workdir /simple johnoel/admb-13.2:linux
  2. Build and run simple model within the container’s interactive shell.

    Build simple.tpl.

     admb simple.tpl

    Run simple executable.


    Exit container shell.


Docker run options

Below details the options for docker run:


  • -it opens an interactive shell.

  • –env LDFLAGS=-static builds a static executable (ie admb -p).

  • –entrypoint resets the default program to run.

  • –rm automatically removes temporary files from a docker run.

  • –volume mounts the current local directory $PWD onto the container filesystem at :/simple.

  • –workdir changes the container current directory to /simple.

  • johnoel/admb-13.2:linux is the name of the Docker Image and simple.tpl is the file to build.


Below are links to documentation and online support for ADMB and Docker.

ADMB Foundation © 2007–2024