Skip to Content
Technical Articles
Author's profile photo Andreas Schaller

SAP Content Server 6.50 with Docker Image

1 Introduction

This blog post shows how to setup a SAP Content Server 6.50 in combination with Docker.

On Linux an Apache Server provides the components for the http(s) communication. Details on SAP Content Server API can be found in SAP Help.

By default, a MaxDB is normally used as storage for the documents and it’s automatically installed during the provided standard setup.

But there is also the possibility to store documents in file system, which makes backup and recovery from content much easier.

For the operation with filesystem you don’t need the complete standard installation, only a few binaries from SAP Softwarecenter.

2 Main Part

2.1 Prerequisites

  • Linux OS (e.g. Ubuntu on WLS2) with Docker Container runtime.
  • Valid S-User for access to SAP Softwarecenter

Information how to get WLS2 running on your windows environment can be found here:
https://docs.microsoft.com/de-de/windows/wsl/install-win10

2.2 Download Files from Softwarecenter

Open URL https://launchpad.support.sap.com/#/softwarecenter

2.2.1 Content Server Binaries

Search for “SAP Content Server” within Downloads.

  1. Choose SAP CONTENT SERVER 6.50 – Maintenance Software Component.
  2. Select LINUX ON X86_64 64BIT Operating System.
  3. Download CONTSERVE650SP10_0-10013599.SAR (or a different SP version) file.

2.2.2 SAPCAR Utility

Search for “SAPCAR” within Downloads.

  1. Choose SAPCAR 7.21 – Maintenance Software Component.
  2. Select LINUX ON X86_64 64BITOperating System.
  3. Download SAPCAR_1320-80000935.EXE (or a different SP version) file.

2.3 Prepare Download

Create (or change to) a directory containing your docker images and create a sub-folder for the content to build the docker image.

Create a sub-folder for the content of the downloaded binaries.

Copy the downloaded files into that directory. On WLS2 this can be done with cp command.

cp /mnt/c/Users/<WindowsUser>/Downloads/SAPCAR_1320-80000935.EXE .
cp /mnt/c/Users/<WindowsUser>/Downloads/CONTSERVE650SP10_0-10013599.SAR .

( don’t forget the dot at the end of the command. )

Extract SAR image.

./SAPCAR_1320-80000935.EXE -xvf CONTSERVE650SP10_0-10013599.SAR

Change to parent directory.

2.4 Repository Folder

Create repository root directory and sub-directory for the repository named REPO1.

Enable writing.

sudo chmod -R a+w RepRoot

Check attributes.

2.5 Content Server Configuration – cs.conf

Create the SAP Content Server configuration file.
Details about the configuration file can be found here.

Content of cs.conf

[ContentServer]
TraceLevel=warning
AdminSecurity=0
AdminSecurityGroup=sapsys
ContRepRoot=/usr/local/apache2/RepRoot
PSEDir=/usr/local/apache2/RepRoot
StorageDriver=FSStorage

[contRep-REPO1]
Storage=FileSystemStorage. dll
Security=0
ContRepDescription=Demo Content Repository

( Exit VIM with ESC and :wq )

2.6 Dockerfile

Create Dockerfile and open VIM.

Content of Dockerfile

FROM httpd:2.2
COPY ./cs.conf /usr/local/apache2/
#COPY ./httpd.conf /usr/local/apache2/conf
COPY ./download/*.so /usr/local/apache2/modules/
RUN chmod a+x /usr/local/apache2/modules/*
RUN mkdir /usr/local/apache2/RepRoot

2.7 Build Docker Image

docker build -t sapcs-650 .

( don’t forget the dot at the end of the command. )

2.8 Apache Configuration – httpd.conf

Run Docker Image

docker run -dit --rm --name my-sapcs-650 -p 1090:80 sapcs-650:latest

Copy httpd.conf from docker image to host.

docker cp my-sapcs-650:/usr/local/apache2/conf/httpd.conf .

( don’t forget the dot at the end of the command. )

Stop docker container.

docker stop my-sapcs-650

Adapt httpd.conf file

Part to be inserted

LoadModule sapcs_module modules/mod_sapcs22.so
<IfModule mod_sapcs.cpp>
AddModuleInfo sapcs "SAP Content Server (C) SAP AG 1998,2003"
CSConfigPath /usr/local/apache2/cs.conf

<Location /sapcs>
SetHandler sapcs_module
Allow from all
</Location>

<Location /ContentServer/ContentServer.dll>
SetHandler sapcs_module
Allow from all
</Location>

<Location /contentserver/contentserver.dll>
SetHandler sapcs_module
Allow from all
</Location>
</IfModule>

Insert position

2.9 Include httpd.conf into Dockerfile

Start VIM with Dockerfile

Remove comment in order to use your customized httpd.conf file.

2.10 docker-compose.yml

Create docker-compose.yml file and start VIM.

Content of docker-compose.yml

version: "3.8"
services:
  version-650:
    build: .
    ports:
      - "1090:80"
    volumes:
      - type: bind
        source: ./RepRoot
        target: /usr/local/apache2/RepRoot

2.11 Start Content Server

Start container.

docker-compose up -d

2.12 Test Content Server

2.12.1 Get ServerInfo

Open browser with URL.

http://localhost:1090/ContentServer/ContentServer.dll?serverInfo

You should see something similar to this.

2.12.2 Store and Receive demo.txt

Prepare a demo.txt File

Upload File

Use Postman or a similar tool to create a PUT request.

http://localhost:1090/ContentServer/ContentServer.dll?create&pVersion=0046&contRep=REPO1&docId=4B7689654E73D21197E70060B0672A33&compId=demo.txt 

Download File

Use Postman, a similar tool or a browser to create a GET request.

http://localhost:1090/ContentServer/ContentServer.dll?get&http://localhost:1090/ContentServer/ContentServer.dll?create&pVersion=0046&contRep=REPO1&docId=4B7689654E73D21197E70060B0672A33&compId=demo.txt

2.12.3 Check REPO1 Folder

Note: The content of demo.txt can’t be viewed directly on the file system, because it’s encoded as each stored document.

2.13 Stop Content Server

Stop the running container.

docker-compose down

3 Conclusion

As you have seen, using Docker to set up an apache2 server on linux is quite easy. And with proper preconfigured configuration files it’s not a big deal for an SAP Content Server either.

Also backup and restore of the content within the REPO1 folder is compared to MaxDB unsophisticated.

The Docker Image as shown here is suitable for test purposes and POCs w/o high security requirements. Additional security settings must be taken into account in productive operation.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Tobias Winterhalter
      Tobias Winterhalter

      Hi Andreas,

      Nice article! The current Content Server release is 7.53 which does no longer require Apache and should be equally suited to run as Docker image (see SAP Notes 719971 and 2786364).

      Best,
      Tobias