Linux Container (LXC) is a lightweight virtualization technology that utilizes kernel-based virtualization to isolate processes and resources. Docker extends LXC by providing higher-level APIs and simplifying application packaging and deployment, creating isolated private environments for end users and effectively saving environment setup time for developers and system administrators.
SuperMap iPortal is now available on Alibaba Cloud and Docker Hub (Image addresses: registry.cn-beijing.aliyuncs.com/supermap/iportal, supermap/iportal). Starting from iPortal 11i(2023) SP1, DockerHub is no longer supported. It is recommended to obtain the iPortal image from Alibaba Cloud. Deploying iPortal in Docker only requires a few steps.
Install Docker
Install Docker in a Public Network Environment
Install Docker Desktop on Windows
1. Enable virtualization on your computer.
This is usually enabled by default. You can check if virtualization is enabled via "Task Manager → Performance → CPU".
- Enable Hyper-V.
Enable Hyper-V to use virtual machines. This can be configured via "Control Panel → Programs → Turn Windows features on or off → Check Hyper-V". A restart is required after enabling.
- Visit https://docs.docker.com/desktop/windows/install/ to download Docker Desktop.
- Install Docker Desktop by following the prompts.
- Open Docker Desktop and wait for it to start.
If prompted with "Hardware assisted virtualization and data execution protection must be enabled in the BIOS", it may be because some programs disable the hypervisor.
Solution: Run CMD as administrator and execute the following command:
bcdedit /set hypervisorlaunchtype auto
After the operation is successful, restart your computer and reopen Docker Desktop.
- When the whale icon in the lower left corner has a green background, Docker is ready.
Install Docker on Linux
Install Using the Convenience Script
This example uses CentOS-7-x86_64. The convenience script is suitable for multiple systems like CentOS, Debian, Ubuntu, etc. It does not support custom installation configurations. For details, refer to the official documentation: https://docs.docker.com/engine/install/.
Note: You must log in as the root user or a user with the highest privileges to perform the following operations.
1. Install using the convenience script:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
2. After installation, execute the following command to check the Docker version and confirm successful installation:
docker --version
Manual Installation
This example uses Ubuntu_18.04_LTS x86_64. For Docker installation on other systems, refer to the official installation documentation: https://docs.docker.com/engine/install/.
Note: You must log in as the root user or a user with the highest privileges to perform the following operations.
1. Uninstall any old versions that may exist:
apt-get remove docker docker-engine docker.io containerd runc
2. Update the apt package index:
apt-get update
3. Install the following packages to allow apt to use a repository over HTTPS:
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
4. Add the GPG key and set up the stable repository
- Obtain from Docker Official
4.1 Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4.2 Set up the stable repository:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- Obtain from Alibaba Cloud
4.1 Add Alibaba Cloud's GPG key:
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
4.2 Set up the stable repository:
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
5. Update the apt package index again:
apt-get update
6. Install the latest version of Docker CE:
apt-get install -y docker-ce
At this point, Docker installation is complete. You can verify the installation with the following command:
docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it will print a message and exit automatically.
Offline Installation of Docker
For LAN environments without public network access, we have collected and created Docker offline installation packages for common operating systems. If needed, please contact SuperMap Support Center. You can also refer to the Docker official documentation for installation: https://docs.docker.com/engine/install/binaries/.
After installation, start Docker:
service docker start
Obtain the iPortal Image
Note: For Windows systems, open CMD (Command Prompt) to perform operations. For Linux systems, log in as a user in the docker group or as the highest privilege user (root), or execute docker commands with sudo privileges.
Obtain the SuperMap iPortal Image in a Public Network Environment
- Obtain the iPortal image
You can obtain the iPortal image from Alibaba Cloud.
To pull a specific version of the iPortal image, you need to specify the corresponding tag. The rules are as follows:
For Linux X86-64 architecture image tag: [version]-amd64
For Linux ARM64 architecture image tag: [version]-arm64
For example, enter the following command to obtain the Linux X86-64 architecture iPortal image version 11.2.0:
docker pull registry.cn-beijing.aliyuncs.com/supermap/iportal:11.2.0-amd64
Enter the following command to obtain the Linux ARM64 architecture iPortal image version 11.2.0:
docker pull registry.cn-beijing.aliyuncs.com/supermap/iportal:11.2.0-arm64
- View image information
After downloading, you can view the downloaded image information with the following command:
docker images
Obtain the Offline SuperMap iPortal Image
- For LAN environments without public network access, you can contact SuperMap Support Center to obtain the offline iPortal image.
- Copy the obtained iPortal image (*.tar) to the offline environment and import it into Docker
docker load -i *.tar
- Check if the import was successful with the following command:
docker images
Start and Use iPortal
Run the Docker Container
Based on the obtained iPortal image, run a Docker container named iportal1.
-
If you downloaded the image from Alibaba Cloud, execute the following command, taking the Linux X86-64 architecture image version 11.2.0 as an example:
docker run --security-opt seccomp=unconfined --name iportal1 -d -p 8190:8190 -p 8195:8195 -v `pwd`/myOPTs:/opt/iportalOPTs registry.cn-beijing.aliyuncs.com/supermap/iportal:11.2.0-amd64
Where:
--name: Specifies a name for the container. --name iportal1 means the container name is set to iportal1;
-d: Runs the container in the background and returns the container ID;
-p 8190:8190 -p 8195:8195: Exposes port numbers 8190 (Web service port) and 8195 (proxy service port) externally.
-v `pwd`/myOPTs:/opt/iportalOPTs: Binds the myOPTs directory under the current directory to the /opt/iportalOPTs directory inside the container.
registry.cn-beijing.aliyuncs.com/supermap/iportal: Represents the corresponding image name. If you obtained an offline image, enter the corresponding image name here. You can view existing local image information with the following command:
docker images
Wait a few seconds for iPortal startup to complete. Enter http://<host IP>:8190 in your browser to access iPortal.
License Configuration
The license configuration methods for Docker-deployed iPortal are as follows:
-
Normal license configuration process:
-
For file license usage, place the container-adapted license file in the container's LICENSE_DIR (default is /opt/SuperMap/License) directory. The container hostname must match the one recorded in the license file;
-
For hardware license dongle usage, add the following to the startup command:
-e LICENSE_SERVER=License Server IP
-
Cloud license configuration process: Please refer to the Cloud License section.
-
Web license configuration process: Please refer to the Web License section, or add the following to the startup command:
-e BSLICENSE_SERVER=ws://{ip}:{port}
-e BSLICENSE_FEATURE_IDS=LicenseID1_LicenseID2
After license configuration is completed, you can enter the iPortal homepage.