{"id":42134913,"url":"https://github.com/beroset/docker_dss","last_synced_at":"2026-01-26T16:11:06.344Z","repository":{"id":53493707,"uuid":"204765779","full_name":"beroset/docker_dss","owner":"beroset","description":"Build and run EPRI's OpenDSS software in a Docker container","archived":false,"fork":false,"pushed_at":"2023-11-07T15:49:13.000Z","size":50,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T18:33:46.707Z","etag":null,"topics":["docker","docker-image","opendss","virtualization"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beroset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-27T18:31:08.000Z","updated_at":"2025-01-19T11:29:14.000Z","dependencies_parsed_at":"2023-01-21T22:45:11.690Z","dependency_job_id":null,"html_url":"https://github.com/beroset/docker_dss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beroset/docker_dss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beroset%2Fdocker_dss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beroset%2Fdocker_dss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beroset%2Fdocker_dss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beroset%2Fdocker_dss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beroset","download_url":"https://codeload.github.com/beroset/docker_dss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beroset%2Fdocker_dss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28782164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","opendss","virtualization"],"created_at":"2026-01-26T16:11:05.674Z","updated_at":"2026-01-26T16:11:06.336Z","avatar_url":"https://github.com/beroset.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"EPRI's [OpenDSS](https://sourceforge.net/projects/electricdss/) is software, written in Pascal, that is an electric power Distribution System Simulator (DSS).  [Docker](https://www.docker.com/) is a software virtualization program that is designed to run software in *containers*.  This project provides the few additional files to allow one to both compile and run OpenDSS in a Linux container image based on any of seven different Linux distributions.  Although the script files are configured to use [Podman](https://podman.io/), Docker can also easily be used.  \n\n## Prerequisites\n### Using Podman\nPodman is a daemonless container engine and can easily be used instead of docker.  Because it does not require any special privileges, this project uses Podman, but the syntax of the Podman commands is essentially identical to Docker's so either can be used.\n\n### Using Docker\nBecause it is well documented elsewhere, this document will not describe the process for installing and running Docker.  \nTo test if docker is running we can use\n\n    sudo docker info\n\nOn Fedora and similar, the configuration file is `/usr/lib/systemd/system/docker.service`.\n\n## Building OpenDSS in a container image\n### The easy way\nThe simplest way to build a container directly using Podman is to create a repository directly from git:\n\n    podman build git://github.com/beroset/docker_dss.git -t beroset/opendss\n\nThis creates a Debian-based image by temporarily cloning the repository.\n\n### The hard way\nThe build instructions used within this project are inspired by [these build instructions](https://sourceforge.net/p/electricdss/discussion/861976/thread/b32b74a2/5f93/attachment/EPRI_Build_OpenDSS_Linux.pdf) but on a container image. \n\nIt is possible build for container images based on many different distributions.  To build a container with the OpenDSS software, run the `create.sh` `bash` script.  Note that this build mechanism requires a recent version of Podman (or Docker) to support [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) and an internet connection.  This starts with a Debian software container, adds required build software and then downloads and install the FreePascal compiler, `fpc` and then the OpenDSS software (including the `klusolve` library) is created.  With the magic of multistage build, we can then create a new, minimal container that includes just the freshly built OpenDSS software.  This is why little effort has been expended on making the build image small, since it is essentially thrown away once the required executable has been created.\n\nIf everything goes successfully, the result will be a `beroset/opendss` container image.  Running `podman images` should verify that the `beroset/opendss` image has indeed been created.\n\n## Different distributions\nThe code currently supports Fedora, Debian, Ubuntu, Arch, OpenSUSE and Alpine distribution containers.\n\n|base   | image size (MB) | build command | notes                 |\n| ----- | ---------- | ------------- | --------------------- |\n|Alpine | 15.6 | podman build -f=work/Dockerfile.alpine work | no issues |\n|Arch   | 449 | podman build -f=work/Dockerfile.arch work | no issues |\n|Debian | 82.7 | podman build -f=work/Dockerfile.debian work | no issues |\n|Fedora | 187 | podman build -f=work/Dockerfile.fedora work | no issues |\n|openSUSE | 123 | podman build -f=work/Dockerfile.opensuse work | no issues |\n|Ubuntu | 85.2 | podman build -f=work/Dockerfile.ubuntu work | no issues |\n\n## Using OpenDSS in a container image\nTo run OpenDSS in a container image requires only the previously created `beroset/opendss` image.  Because OpenDSS takes files as input and (often) creates files as output, we need to share a *volume* with the container to allow this, since ordinarily, the container image has no interaction with the host system's storage.  To do this, we can use a simple `bash` script:\n\n### \n```\n#!/bin/bash\nSHARED_DIR=\"$(pwd)/shared\"\nif [ ! -d \"${SHARED_DIR}\" ]\nthen\n    mkdir \"${SHARED_DIR}\"\nfi\ncp \"$1\" \"${SHARED_DIR}\"\npodman run --rm -itv \"${SHARED_DIR}\":/mnt/host:z beroset/opendss \"/mnt/host/$1\"\n```\n\nThis uses the container image as an executable and passes a file to OpenDSS.  If the project needs multiple files, all of them should be placed in the shared directory.\n\n## Example\nThe [`StevensonPflow-3ph.dss`](http://svn.code.sf.net/p/electricdss/code/trunk/Distrib/Examples/Stevenson/StevensonPflow-3ph.dss) file creates a number of output files which contain solutions to various aspects of the circuit.  \n\nIf you've successfully built OpenDSS in a container image as described above, you can then try this simple test by running `example.sh` from the same directory as this code and documentation exists.  That is, you'd simply write:\n\n    ./create.sh\n    ./example.sh StevensonPflow-3ph.dss\n\nThe result will be six files in the `shared` directory:\n\n    StevensonPflow-3ph.dss        \n    Stevenson_Power_elem_MVA.txt  \n    Stevenson_VLN_Node.Txt\n    Stevenson_Power_seq_MVA.txt\n    Stevenson_NodeMismatch.Txt  \n    Stevenson_Convergence.TXT   \n\nThe first file is, of course, the input file and the other five are the output files which contain the requested calculations.\n\n## Interactive session in a container\nAnother way to run the software is to start in a `sh` shell.  A simple way to do this is:\n\n    podman run --rm -itv \"$(pwd)/shared\":/mnt/host:z --entrypoint=/bin/sh beroset/opendss -i\n\nAs before, the `shared` subdirectory under the host's (your *real* computer's) current working directory is mapped to `/mnt/host` in the virtual Debian machine.  The result is that you may `cd /mnt/host` to get to the shared directory and run OpenDSS (the actual command is `opendsscmd`) or whatever other software the shell would normally provide.  Note that because this is a command-line version only, it does **not** support OpenDSS's GUI, nor the `Plot` command.\n\nFor convenience, this is also put into a shell script `tryme.sh`.\n\n## Testing\nAn overall test suite has been included within the project.  It is in the bash script `testall.sh`.  With a single command, all containers can be built and sanity-tested.  Be aware, however, that this requires an internet connection and may take considerable time - on a 3.4GHz i7 with gigabit fiber internet connection, the full test suite takes about 23 minutes to complete.\n\n    Usage: testall.sh [OPTION]\n            --help              print this help and exit\n            --podman            use Podman as the container engine\n            --docker            use Docker as the container engine\n            --distro dist       only test the specified distro\n            --nocache           build without using existing cached images\n            --logfile log       log details to log file\n\nAs shown above, the `testall.sh` program takes an option to specify which container engine is used.  It also has options for building without using the existing cached images, for logging all build steps to a log file and for selecting just a single distro to use instead of all of them.  If no options are specified, Podman is used by default, using cached images and without a log file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberoset%2Fdocker_dss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberoset%2Fdocker_dss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberoset%2Fdocker_dss/lists"}