Running ORIGAM Server in Docker Locally
This guide will walk you through the process of running official Origam docker images of version 2024.10 and later on your local machine for development or testing purposes.
If you want to build and run your own image from ORIGAM source folow this guide.
If you want to run an earlier image than 2024.10 look at this guide.
Prerequisites
- Docker installed on your system
- Basic knowledge of command-line operations
We’ll be using the test model included in the ORIGAM repository for this demonstration. This guide assumes you’re working in the directory C:\Origam\MyProject\Docker
, but feel free to adjust the paths as needed for your setup.
Steps
- Create Environment File
- Run Docker Container
1. Create Environment File
Create a new file named demo.env
in your working directory (for example C:\Origam\MyProject\Docker
) with the following content:
OrigamSettings_SetOnStart=true
OrigamSettings_SchemaExtensionGuid=f17329d6-3143-420a-a2e6-30e431eea51d
OrigamSettings_DbHost={ip address of your db}
OrigamSettings_DbPort=1433
OrigamSettings_DbUsername={your db user}
OrigamSettings_DbPassword={your db password}
DatabaseName=origam-demo
DatabaseType=mssql
ExternalDomain_SetOnStart=https://localhost
TZ=Europe/Prague
Replace the placeholders {ip address of your db}
, {your db user}
, and {your db password}
with your actual database details. If your database runs on your local machine set OrigamSettings_DbHost=host.docker.internal. You can also change the time zone the container will be running in by changing TZ=Europe/Prague
.
Note: If you’re using a different model than the test model, you’ll need to change OrigamSettings_SchemaExtensionGuid
(package ID of the main package in your model), DatabaseName
, and OrigamSettings_ModelName
accordingly.
2. Run Docker Container
Now you can run the Docker image with this command (adjust paths as necessary):
docker run --env-file C:\test\docker\demo.env ^
-it --name OrigamDemo ^
-v {path to test model}\model-tests\model:/home/origam/HTML5/data/origam ^
-p 443:443 ^
origam/server:master-latest.linux
Replace {path to test model}
with the actual path to the test model on your system.
This command does the following:
- Uses the environment file we created
- Names the container “OrigamDemo”
- Maps port 443 from the container to your host machine
- Uses the latest ORIGAM server image for Linux
Accessing the Application
After running the Docker command, wait for the container to start up. Once it’s ready, you can access the ORIGAM application by opening https://localhost
in your web browser.
Note: Since we’re using a self-signed certificate, you may see a security warning in your browser. This is expected and you can proceed safely for development purposes.
Troubleshooting
- If you encounter issues with the database connection, double-check your database details in the
demo.env
file. - Make sure all paths in the Docker run command are correct and the files exist.
- If you’re unable to access the application, ensure no other service is using port 443 on your machine.
Notes
Form more details on the docker image, enviromnetal variables and configuration look here.