--- title: "SiteManager Embedded in Docker" slug: "sitemanager-embedded-in-docker" updated: 2024-06-25T13:33:29Z published: 2024-06-25T13:33:29Z canonical: "kb.secomea.com/sitemanager-embedded-in-docker" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.secomea.com/llms.txt > Use this file to discover all available pages before exploring further. # SiteManager Embedded in Docker ## - This tutorial will provide you with the skills needed to run SiteManager Embedded in Docker. SiteManager Embedded is the software version of SiteManager; the plug-in IoT Gateway for secure remote access, device analytics, permissions management and Machine Data collection. Using SiteManager in Docker enables convenient SiteManager Embedded implementation across multiple devices on your intranet. At the end of this article, you will have created your own containerized installations of SiteManager Embedded. Essential skills: - You'll need some knowledge on to how to install and use Docker. You can find information here: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/) . - You should have a basic understanding of how to use the Secomea solution: [Start here](/v1/docs/starthere) . Essential Tools:  - A PC suitable for use as a build server (It must have a compatible OS), running Docker version 20 (or higher). - You will need a docker repository for cross-building on multiple devices. ## ## How to run a container on a Local target host In this example, we will use a Raspberry pi with HypriotOS as the target host device. Essential resources: - Docker must be installed on the target host. - Downloaded Secomea Dockerfiles (firmware is automatically downloaded from Secomea) **Instructions:** 1. Download the Secomea docker file (from the links at the bottom of this article) to the target host. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-22%20at%2011.18.17.png) 2. Place the docker file into a suitable folder on the target host. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-22%20at%2011.00.34.png) 3. Build the Dockerfile in a suitable location (See the example directory below). ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-22%20at%2011.15.28.png) Use this Syntax: **Command options dockerfile imagename:tagname** ```shell //Build command example docker build -f v6322_arm.Dockerfile -t sme_v6322_armv7_dcm . ``` 4. Set up the configuration file so it can connect to Gate Manager. First, we need to create the folder "/opt/secomea/sme" and the configuration file sme.txt ```shell //use this command to create and go into the folder sudo mkdir -p /opt/secomea/sme && cd /opt/secomea/sme ``` Then set up the configuration file so that it can establish a GM connection. Create a file called `sme.txt` in the prepared configuration directory and type in the GM FQDN or IP address, and the domain the SM-E should attach to: **Server=gmXX[.secomea.com](//.secomea.com)** **Domain=domainname** ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-27%20at%2011.02.15.png) Your containerized SiteManager Embedded installation is now ready for use. ```shell // Run command example: docker run -d --network host -v /opt/secomea/sme:/etc/sitemanager -w /etc/sitemanager --privileged sme_v6322_armv7_dcm ``` ## ## ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-27%20at%2011.06.00.png) ## Cross-build SiteManager Embedded in Docker This implementation is used to scale SiteManager Embedded over multiple devices. This is useful for running SM-E docker on multiple machines with substantially different specifications. Our example uses a PC with FedoraOS as the build server and a Raspberry pi with HypriotOS as the target host. This method can be used with any compatible system. Prerequisites - A build server (PC) with Docker Engine version 20+. - Docker must be installed on the target host. - Secomea Dockerfiles (all firmware is automatically downloaded from Secomea). - A Docker hub repository (Free for non-commercial use). You must enable the multi-architectural build environment in Docker: ```shell docker run --privileged --rm docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 DOCKER_BUILDKIT=1 ``` **Instructions:** **On the build PC** 1. Download the docker distribution compatible with your target host. You can download Secomea Dockerfiles from the bottom of this article. 2. Prepare Docker by accessing the docker file in a folder on your build server. The syntax is: ```shell //Build with any file name: docker build --platform linux/arm/v7 -f v6122_arm.Dockerfile -t v6122_sme . //Change name to match repository and tag docker tag v6122_sme:latest 2voss/my_secomea_containers:95_v6122_sme ``` ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-27%20at%2013.20.49.png) 3. Prepare your docker Container by building the Docker file in a suitable location on the Build Server PC. Note: If you already know your docker repository, you can choose to build your container under the name of your repository: ShellShellShell ```shell docker build --platform linux/arm/v7 -f v6122_arm.Dockerfile -t 2voss/my_secomea_containers:95_v6122_sme . ``` ## ## ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-13%20at%2015.23.35.png) 4. Upload to your Docker repository from the Build Server PC. ```shell //Login to your docker repository docker login *Username *Password //Push to your repository docker push 2voss/my_secomea_containers:95_v6122_sme ``` ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-27%20at%2013.32.52.png) #### Install containers on Target Host devices. 5. Download your newly built container from the Repository to the Target Host(s). ```shell //Login to your docker repository docker login *Username *Password //Pull command example docker pull 2voss/my_secomea_containers:95_v6122_sme ``` 6. Verify the existence of your container. ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-13%20at%2015.23.52.png) 7. Set up a configuration file so it can connect to Gate Manager Embedded. First we need to create the folder "/opt/secomea/sme" and the config file sme.txt ```shell //use this command to create and go into the folder sudo mkdir -p /opt/secomea/sme && cd /opt/secomea/sme ``` 8. Type in Gate Manager’s FQDN. Alternatively, type in the IP address and domain name Site Manager Embedded should attach to. **Server=gmXX[.secomea.com](//.secomea.com)** **Domain=domainname** Or **Server=xxx.xxx.xxx.xxx Domain=domainname** ![](https://cdn.document360.io/88f49507-a7a0-4636-b297-13c4d0065310/Images/Documentation/Screenshot%202021-09-27%20at%2011.02.15(1).png) Congratulations! You are now ready to launch SiteManager Embedded from a Docker Container. Shell `// Run command exampledocker run -d --network host -v /opt/secomea/sme:/etc/sitemanager -w /etc/sitemanager --privileged 2voss/my_secomea_containers:95_v6122_sme` ## Additional information How to start and stop your SiteManager Embedded container: ```shell // Container list docker container ls //Stop container docker container stop [ID] //Start container docker container start [ID] ``` Containerized versions of SiteManager Embedded cannot update through the GateManagerCreate a new container instead. ## Downloads | Type | Dockerfile links | Version | | --- | --- | --- | | Linux X86 - 64 bit (typically Debian based OS or similar) | [v6111_x64.Dockerfile](https://files.secomea.com/download/61569dd3340fd6.76539361.Dockerfile) | Ver 1.0 | | Linux ARMv7 - 32 bit | [v6122_arm.Dockerfile](https://files.secomea.com/download/61569dd36654e8.92492265.Dockerfile) | | Linux ARMv8 - 64 bit | [v6142_AARCH64.Dockerfile](https://files.secomea.com/download/61569dd38aa751.14417671.Dockerfile) |