You can use a Docker volume to copy the files to the running container, even directly mounting the volume to CARBON_HOME/repository/deployment/server/eventreceivers/
.
You can even mount the volume to CARBON_HOME/repository/deployment/server/carbonapps/
, package the event receivers, publishers, streams etc as a Carbon Archive, and copy the resulting .car
file to the volume so that Carbon itself would take care of undeploying and redeploying the new artifacts.
However the best approach would be to actually rebuild the images when the artifacts get updated. Containerization, especially with Docker, encourages immutability of the servers and the deployment should be updated with a new Docker image rather than modifying existing containers. If the frequency at which these artifacts get updated is not unmanageably high, I would always suggest to follow Docker image building approach.