I’m looking to mount a local directory on my host machine to my docker container.
Here is my current docker-compose.yml:
version: '2' services: my-service: build: . ports: - "8080:8080" volumes: - .:/code
It gives no errors when I docker-compose build but when I docker-compose run, I’m expecting ./code to be populated with the contents of . on my local machine. In my Dockerfile, if I RUN ls /code, I get the following:
ls: cannot access '/code': No such file or directory
Can anyone spot what I’m doing wrong?