Wrong volume permissions for Linux container running on Docker for Windows with "platform: Windows" parameter

Hi. I’m trying to run two containers on Docker for Windows, one running Linux, the other Windows. The Linux container contains Jenkins, and keeps running into a wrong volume permission error.

I’ve tried looking at different topics where it was suggested to enable shared drivers in Docker - I don’t have that tab, and have furthermore read that sharing drivers in Docker for Windows with Windows containers isn’t needed. What I need however is a Linux container.

Is it possible to run both a windows and a linux container on the same host, both with volumes attached? Below is the docker-compose file I’m using. Only v. 2.4 supports the platform parameter as far as I’ve found out.

version: '2.4'
   container_name: jenkins-master
   image: jenkins
   platform: linux
     - 8080:8080
   container_name: jenkins-agent
   image: microsoft/nanoserver
   command: ping -t localhost
   platform: windows

I’m running Docker CE version 18.03.1-ce-win65 (17513) and Docker-compose v. 1.21.1

The complete error I get:

jenkins-master     | touch: setting times of '/var/jenkins_home/copy_reference_file.log': Permission denied
jenkins-master     | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?

Any help would be greatly appreciated.