As announced by the blog SAP ABAP Platform 1909, Developer Edition: AVAILABLE NOW of my colleague Julie Plummer the new ABAP Platform developer edition is available as a Docker image so that you can run it on your laptop.
Running it on you laptop does also mean that you are responsible for it and that you have to make sure to shutdown the system in a proper way.
Unfortunately Docker only waits up to 10 seconds for a container to stop before it kills the process which will then result in an inconsistent HANA DB ?.
This happened to me on the very first day as a ABAP Platform developer edition user ?.
As mentioned in the setup instructions of the ABAP platform docker image in order to gracefully shutdown your docker image you should run the following command before stopping docker or shutting down your laptop.
docker stop --time 7200 a4h
So if you just shutdown your laptop (as I did) without having run the above mentioned command beforehand you have a problem …
If this happens to you, you only have to delete the container using Docker Desktop and recreate it using the following command
docker run --stop-timeout 3600 -i --name a4h -h vhcala4hci -p 3200:3200 -p 3300:3300 -p 8443:8443 -p 30213:30213 -p 50000:50000 -p 50001:50001 store/saplabs/abaptrial:1909 -skip-limits-check -agree-to-sap-license
So you fortunately don’t have to download the whole image again ?.
However all the ABAP development you have done might be lost if you haven’t saved it to some Git repository.
Reading through the setup instructions I was wondering whether there is a way to run the command as a script automatically when shutting down Windows because I know myself and I was sure that I would otherwise run into this problem again and again.
As described in this answer posted on Stackoverflow it is possible to do the following:
- Run gpedit.msc to open the Group Policy Editor
- Navigate to Computer Configuration | Windows Settings | Scripts (Startup/Shutdown).
- Double click on Shutdown
Local Group Policy Editor (Picture taken from above mentioned answer in Stackoverflow)
This will open a dialogue to select a script from a location of your choice. The default location (administrative access is needed) is the following folder
Here I have created the script stop_docker.cmd
The source code of this script is shown here
set MyDir="C:\temp" IF not