Technical Articles
Installing Docker on an SAP Cloud Platform Virtual Machine
When you start using a virtual machine offered by SAP Cloud Platform, you’ll notice that it comes with a default operating system, currently SUSE Linux Enterprise Server 12 SP1, without any additional software installed on it.
SAP doesn’t take responsibility for the installation and support of any third-party software. It’s up to you as the owner of the virtual machine to decide what software you want to install and which third-party repository you use to download the software. For more information, see Installing and Maintaining Software on a Virtual Machine.
For this tutorial, let’s take Docker as a popular example and install it on an SAP Cloud Platform virtual machine.
Prerequisites
- You have purchased an SAP Cloud Platform virtual machine. You won’t be able to try out the tutorial on Trial.
- You have created an SAP Cloud Platform virtual machine. For more information, see Manage Virtual Machines.
- You have set up an SSH connection to the virtual machine. For more information, see Setting Up an SSH Client to Connect to SAP Cloud Platform Virtual Machines.
Installation
- To configure your access to the SUSE Linux Enterprise Server (SLES) repositories, run the following command in your SSH client:
zypper addrepo -f https://slesrepo.{region_host}/repo/SUSE/Products/SLE-SERVER/12-SP1/x86_64/product/ SUSE12SP1
Replace {region_host} with the corresponding Neo environment region host:
Region Host Europe (Rot) hana.ondemand.com or eu1.hana.ondemand.com US East (Sterling) us3.hana.ondemand.com Australia (Sydney) ap1.hana.ondemand.com - Add the repository that contains the Docker package:
zypper addrepo -f https://yum.dockerproject.org/repo/main/opensuse/13.2/ docker-main
- Download and install Docker:
zypper --non-interactive --no-gpg-checks install docker-engine=17.05.0.ce-1
- (Optional) To verify that Docker has been properly installed, run the following commands:
service docker start
docker version
- (Optional) If you want Docker to start automatically when the virtual machine boots, run:
systemctl enable docker
These steps should help you get started with Docker on your SAP Cloud Platform virtual machine. If you have any questions or any other type of feedback, don’t hesitate to share it in the comments below.