0

I have created a setup for ELK in a docker container. I am wondering if there is a way to add a volume or mount without having to do it in the run command that creates the container? Do I have to destroy this container and create a new one with the -v flag or can it be done to my already created one. The scenario I am having is that I setup a repo after i had created the container. I want the repo files stored on the host ot within the container. The current setup is not ideal as every night a cron job runs, copies the repo folder from the container, moves it to the host FS to a tmp folder, tar's the folder then drops it in the backups folder on our host machine. Afterwards it removes prior backups. I want the repo to just store outside of the container directly to the host folder i created. Is this possible without having to create / initialize a new container and loose all my configurations?

FYI The way I am using docker is with sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk

Thanks

Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
  • semantic point: docker images do not have volumes or mounts. docker *containers* have volumes and mounts – erik258 Jan 30 '22 at 00:22
  • Thanks and sorry for a redundant question. I was wondering if another route besides the backup / restore or if that was not the standard way. Thanks and will close the question. – Casey ScriptFu Pharr Jan 30 '22 at 00:25

0 Answers0