Docker Community Forums

Share and learn in the Docker community.

Unable to use dir from HOST in Windows container (compose)


(Zenna) #1

Docker-compose

version: ‘3’
volumes:
volume01:

services:
backend:
build:
context: .
dockerfile: Dockerfile
container_name:
app
volumes:
- C:\temp:\data

networks:
default:
external:
name: nat

Dockerfile:
FROM microsoft/dotnet-framework:4.7.2-sdk AS build
WORKDIR /app

COPY *.csproj ./
COPY packages.config ./
COPY *.json ./
COPY . ./
RUN ls /app


ENTRYPOINT [“App.exe”, “C:\temp”]

The error that I get is invalid volume specification. I need some json files as input to the application

How should I mount this volume? I tried also different commands with --mount /v