Python remote interpreter docker-compose permission denied

Answered

I tried to adding docker compose project as written in https://blog.jetbrains.com/pycharm/2017/03/docker-compose-getting-flask-up-and-running/.

I can run the project from Run configuration without issues. Also if I choose as remote interpreter just Dockerfile it works fine.

If I try to add python remote interpreter docker compose following happens:

 



Failed to run single Docker Compose service web: .IOError: [Errno 13] Permission denied: '/home/filip/work/videmi/videmi/docker-compose.yml'

Versions:

$ docker --version
Docker version 1.13.1, build 7f1fa5c-unsupported
$ docker-compose --version
docker-compose version 1.17.1, build 6d101fb

 

PyCharm 2017.3.3 (Professional Edition)
Build #PY-173.4301.16, built on January 11, 2018
Licensed to Filip Dobrovolný
Subscription is active until January 16, 2019
JRE: 1.8.0_152-release-1024-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.16-300.fc27.x86_64

Docker compose

version: "3"
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: psql_passwd
ports:
- "5432:5432"
redis:
restart: always
image: redis:alpine
expose:
- "6379"
web:
build:
context: .
dockerfile: Dockerfile.dev
image: videmi_app:latest
command: yarn start
volumes:
- .:/code:Z
ports:
- "3000:3000"
- "3001:3001"
- "8000:8000"
environment:
- DEBUG=true
- DATABASE_URL=postgres://postgres:psql_passwd@db:5432/postgres
- REDIS_URL=redis://redis
depends_on:
- db
- redis

 

6 comments

Hi,

Could you please try the latest PyCharm version, which is currently 2018.1.3?

Previous PyCharm versions used the Docker Compose image and they mounted docker-compose.yml configuration files into the Docker Engine, which in some cases may have caused an IOError.

0

I have 2018.3.3 and the same problem:

0

I have the same problem as well - same like Paulo.

0

For anyone with permission denied error - please try to create a file in /home/<your_current_user>/.PyCharm2018.3/system/tmp/docker

Just any file, to test the access permission, using the same user you're running PyCharm from.

0

I can create files in `/home/<your_current_user>/.PyCharm2018.3/system/tmp/docker` - it's not obvious where the permission error is coming from.

I'm able to start and stop docker-compose from the command-line. I'm using the latest version of PyCharm.

I get the exact same error with the EAP version of PyCharm, so I wonder if it's something odd about how Docker runs on my Ubuntu PC.

0

I think this is a problem with the version of Docker Compose installed via Snap.

I fixed this problem by uninstalling the Snap version of Docker, re-installing Docker-CE (from the instructions on Docker's web-page), and then installing the latest version of docker-compose via Pip.

0

Please sign in to leave a comment.