Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Platform 1909 Docker: commit / persistence of changes

former_member185932
Participant

I have installed ABAP Platform 1909 Developer Edition using Ubuntu and Docker. I am familiar with the docker commands "run" to start the container, "stop" to stop the container and "start" to restart the container.

After stopping the container I can remove it from docker using "docker rm" and then start it again using "docker run". However, the restart results in a fresh installation of the system... any ABAP artefacts created in the previous container are lost.

It seems unlikely that I can keep the Ubuntu server running constantly. Is there a way to retain changes to the container even after "docker rm" and "docker run" commands (or a power outage)?

Regards,
JB

1 ACCEPTED SOLUTION

joltdx
Active Contributor

"Is there a way to retain changes to the container even after "docker rm" and "docker run" commands".

No, but that's actually the whole point of the docker rm command, that will reset the container... 🙂

Instead, you restart the stopped a4h container with

docker start -ai a4h

That should do the trick! (It's actually the very last thing in the setup instructions)

5 REPLIES 5

joltdx
Active Contributor

"Is there a way to retain changes to the container even after "docker rm" and "docker run" commands".

No, but that's actually the whole point of the docker rm command, that will reset the container... 🙂

Instead, you restart the stopped a4h container with

docker start -ai a4h

That should do the trick! (It's actually the very last thing in the setup instructions)

Former Member
0 Kudos

preceded by

ctrl+c 

when shutting the system down gracefully.

both work like a 'charm', esp when letting them run their course for a few minutes.

Thanks jorgen_lindqvist41 I did not realise that a stopped container survives a system restart. I had assumed that the containers were lost. So the advice is to only issue the command "docker run" once and then perform container management when restarting the computer / server.

Mumali
Participant

Hello jonathan.bourne,

Removing the container means you are gonna to run it afresh. You can instead shut it down by using the command docker stop --time 7200 a4h in a new console and safely close your docker instance. To restart, simply run the command docker start -ai a4h. Your previous activities in the system will be preserved.

Thanks mumali

I have been running my docker in "detached" mode using the -d parameter of docker run so it runs in the background.