Dockerhub I: General
Docker
Sign-up
- First you should Sign up for Docker Hub
Repositories Tags
- For an Overview Matrix42 Silverback Repository is named uem-emm-engine
- There you will find in the future different images for different Silverback Versions
- Each Image has a Tag which will be used later (e.g. latest_dev)
Host Preparation
Windows 10
- Turn the following Windows Features On
Windows Server
- Use Powershell with elevated privileges and run the following commands
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
Dockerhub
- Install Docker Desktop manager https://hub.docker.com/?overlay=onboarding
Improve Convenience
- Download and Install Visual Studio Code
- Navigate after installation in the left panel to Extensions
- Search for Docker
- Double Click and Install Docker extension
- Afterwards you will see the Dockerhub Image in the left panel
- Double Click the Dockerhub Image
- Focus now to three Areas
- Containers: Here you can start, stop, remove Containers with a right click
- Images: Displays all downloaded images from Dockerhub Repository
- Terminal: Here you can run docker commands to initialize a new container
Working with Containers
Define and Pull Image (optional)
First you can pull a image from dockerhub. To run image and create container, please execute following command.
These step is not mandatory for initial installation, but when you want to update your image with newer version it’s more safe to use it. An initial installation will also pull image from dockerhub
docker pull matrix42/uem-emm-engine:latest_dev
Prepare your Folders
On your Local Disk (Windows 10 or Windows Server) create the following 2 Folders
- C:\Docker
Add Config File and Certificates
- Under C:\Docker add the following files
- SSL Certificate
- Silverback Root CA Certificate
- Silverback Web Settings Certificate
- Silverback Settings JSON
For Testing purpose you can easily export from a current Silverback instance all certificates.
Silverback Settings JSON
Add the following adjusted configuration into a Text Editor and save file as *.json
{
"DomainName": "docker.m45dev.eu",
"IsAzure": true,
"ConnectionString": "Data Source=milano-qa-sql.database.windows.net;Initial Catalog=docker005;user id=milano;password=password",
"SslCertificate": {
"FileName": "C:\\settings\\wildcard.m45dev.eu.pfx",
"Password": "M42!Cert@2019"
},
"WebSettingsCertificate": {
"FileName" :"C:\\settings\\websettings_silverback.pfx",
"Password": "12345678"
},
"RootCACertificate": {
"FileName" : "c:\\settings\\root_ca.pfx",
"Password" : "ajax"
}
}
Initialize Container
Now execute in Visual Studio Code under Terminal the following command
docker run -p 80:80 -p 443:443 --mount type=bind,source=C:\Docker,target=c:\settings -e "settingFile=C:\settings\silverback_settings.json" matrix42/uem-emm-engine:latest_dev
- After ~10-15 Minutes the Silverback should be ready to use
Additional Information
- -p [Port] [Ip-Adress] - publishing port of the container matching TCP port of current machine or specific Ip-adress.
- --mount type=bind,source=C:\Docker,target=c:\settings - mount folder in machine filesystem to folder inside container (create and atach volume). In this example: all content of "c:\docker" folder on current host would be shared into folder "c:\settings" of container. It is main approach to send data files to container. Because after deleting of container all data except "volume" will be exposed.
- -e "settingFile=C:\settings\silverback_settings.json" - set the system value in container. For our solution it specify where to find file with settings for configure registry and certificates. In this example - link on setting file in attached folder.
- matrix42/uem-emm-engine:latest_dev - [Image Name : Tag] the name and tag of image for creating container. latest_dev – latest dev image, latest – latest release image, 19.0.3 - specific version latest image
- "ConnectionString": "Data Source=sql.m45dev.eu;Initial Catalog=docker;user id=sa;password=Password",
For more details : https://docs.docker.com/engine/reference/commandline/run/