share Volume from container to host docker-compose

32 Views Asked by At

I need to mount my data inside the container to my local. I am trying to mount the data inside my conatiner path - /usr/local/nagios/etc/objects/command.cfg, i couldnt find a proper way to mount. when i trying to do the mounted floder is empty not files or conentet available.

MY dockerfile

version: '3'

services: nagios-core: build: context: . target: build-nagios container_name: nagios-container-poc
image: nagios-core:4.4.9 ports: - "8080:80" environment: - nagiosadmin_user= - nagiosadmin_password=
command: /start.sh volumes: - /nagios/etc/object/commands.cfg:/usr/local/nagios/etc/object/commands.cfg

0

There are 0 best solutions below