docker build environment doesn't stop cleanly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Scott Little |
Bug Description
Brief Description
-----------------
Docker build container doesn't stop/exit cleanly.
Docker images can't be cleaned up.
Consumption of system resource (disk).
Reboot and significant manual intervention to clean up.
Severity
--------
Major: Consumes system resources
Steps to Reproduce
------------------
docker build --build-arg MYUID=${MYUID} --build-arg MYUNAME=${MYUNAME} --ulimit core=0 --network host --tag $DOCKER_BUILD_IMAGE --file ${DOCKERFILE} .
docker run -it --rm --name ${DOCKER_BUILD_ID} --detach --volume $(readlink -f /localdisk)
docker stop ${DOCKER_BUILD_ID}
docker image rm $DOCKER_BUILD_IMAGE
Expected Behavior
------------------
Build container shuts down cleanly, and the image is auto removed.
'docker image rm' reports 'No such container'
Actual Behavior
----------------
Container is stuck in state 'Removal In Progress'
'docker image rm' reposts ...
unable to remove repository reference "..." (must force) - container e3c76f2e30ac is using its referenced image d8e4d73c1822
Reproducibility
---------------
Reproducible
System Configuration
-------
N/A
Branch/Pull Time/Commit
-------
2019-06-17
Last Pass
---------
N/A
Timestamp/Logs
--------------
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e3c76f2e30ac slittle1-
Test Activity
-------------
build
Our docker builder runs services under systemd.
Systemd requires SIGRTMIN+3 to trigger a clean exit.
Sigterm is ignored.