Deploying iPortal in Docker |
Linux container virtual technology (LXC, Linux Container)is a lightweight virtualization method that uses the kernel virtualization technology to provide lightweight virtualization to isolate processes and resources. Docker expands the LXC, provides higher-level APIs, and simplifies the packaging and deployment of applications, creates independent private environment for end users, which can effectively save the environment deployment time of developers and system administrators.
SuperMap iPortal is online now in the center of the Docker, download link is : http://hub.docker.com/r/supermap/iportal. Only a few steps, users can deploy the iPortal in the Docker.
Here taking Ubuntu Wily 15.10 as an example, introducing how to deploy and run the iPortal in the Docker.
Logging as a root user or a user with supreme authority is needed to do the following operations.
When using apt-get to download the installation package, you need to update the source and install the apt-transport-https to ensure that the system can download the required files correctly. Executing the following commands in sequence:
apt-get update
apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Entering /etc/apt/sources.list.d directory, creating a new docker.list file to add Docker into the apt software installation source:
cd /etc/apt/sources.list.d
vi docker.list
Adding the following content in the docker.list file:
deb https://apt.dockerproject.org/repo ubuntu-wily main
Updating APT package indexes and confirming that APT gets the files from the correct warehouse :
apt-get update
apt-get purge lxc-docker
apt-cache policy docker-engine
For Ubuntu system, suggesting installing linux-image-extra package:
sudo apt-get install linux-image-extra-$(uname -r)
Installing Docker, and starting:
sudo apt-get install docker-engine
sudo service docker start
Verifying whether the Docker is successfully installed. Using this command will download a test file and run it in a container. After a container operating, it will print some information and automatically exit.
sudo docker run hello-world
Since the mirror center of docker is abroad, the download speed is relatively slow. It is recommended to use Aliyun accelerator: https://help.aliyun.com/knowledge_detail/5974865.html, if the operating system is ubuntu, you can use the following script to add configuration of mirror into launch parameters of docker daemon, and restart Docker:
echo "DOCKER_OPTS=\"--registry-mirror=https://hqsuattf.mirror.aliyuncs.com\"" | sudo tee -a /etc/default/docker
sudo service docker start
Executing the following command to download the latest iPortal image in the Docker host machine:
docker pull supermap/iportal
After downloading, you can execute the following commands to view downloaded image information:
docker images
Based on downloaded image, running a Docker container iPortalServer. Executing the following commands:
docker run --privileged --name iPortalServer -d -p 8190:8190 supermap/iportal
Of which:
Waiting for a few seconds until iPortal has completely started. Entering http://<Host IP>:8190 in the browser to visit iPortal.
After starting iPortal, 90 days trial license is obtained by default. When the host machine obtains the official license, you can deploy the official license, see: configuring license information.