Skip to content

Commit

Permalink
Update command to build static executable using docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoel committed Mar 11, 2024
1 parent 3b2691b commit e9ac427
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions scripts/docker/quickstart-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Usage

For Windows host,

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

For Unix host,

docker run --rm --volume $PWD:/simple --workdir /simple johnoel/admb-13.2:linux simple.tpl
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._

Expand All @@ -61,11 +61,11 @@ Usage

For Windows host,

docker run --rm --volume %CD%:/simple --workdir /simple --entrypoint ./simple johnoel/admb-13.2:linux
docker run --env LDFLAGS=-static --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
docker run --env LDFLAGS=-static --rm --volume $PWD:/simple --workdir /simple --entrypoint ./simple johnoel/admb-13.2:linux

For Linux host, executable could be run locally.

Expand Down Expand Up @@ -109,6 +109,8 @@ 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.
Expand All @@ -117,7 +119,7 @@ Below details the options for **docker run**:

* **--workdir** changes the container current directory to **/simple**.

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

Help
----
Expand Down
4 changes: 3 additions & 1 deletion scripts/docker/quickstart-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Usage

2. Build simple.tpl into an Windows executable using the ADMB Docker Image and the mounted current local directory.

docker run -e ADMB_OPTION=-s --rm --volume %CD%:C:\simple --workdir C:\simple johnoel/admb-13.2:windows simple.tpl
docker run --env LDFLAGS=-static --rm --volume %CD%:C:\simple --workdir C:\simple johnoel/admb-13.2:windows simple.tpl

3. Run **simple.exe** Windows executable.

Expand Down Expand Up @@ -91,6 +91,8 @@ Below details the options for **docker run**:

* **-it** opens an interactive shell.

* **--env LDFLAGS=-static** builds a static executable (ie admb.cmd -p).

* **--entrypoint** resets the default program to run.

* **--rm** automatically removes temporary files from a docker run.
Expand Down

0 comments on commit e9ac427

Please sign in to comment.