Question
Muhammad Waseem · Oct 8

How to copy file to container location ?

Hi,

I am using container to run IRIS. In my file service I defined following path:

How can I copy file to container location?

Thanks

Product version: IRIS 2021.1
00
1 0 2 70
Log in or sign up to continue

I believe you need to add a volume to add a directory to the container and you can then browse to that location.

docker run ... -v myFilePathOutside:myPathInsideContainer ...

Normally I create a volume in the docker-compose.yml file to share data between the container and my machine. I define the durable directory in this volume, so when I restart the container I don't lose the data stored.

version: '3.6'
services:
  iris:
    build: 
      context: ./iris
      dockerfile: Dockerfile
    restart: always
    container_name: iris
    ports:
      - 51773
      - 52773:52773
      - 1972:1972
      - 53773
    volumes:
      - ./iris/data:/durable 
    environment: 
      - ISC_DATA_DIRECTORY=/durable
    networks: 
      - production-network