6đź‘Ť
in case you follow the step above and didn’t work for you try to check if busybox:latest image if exists, else pull this again from docker hub.
5đź‘Ť
That error message usually appears when Docker is not able to build your image and tries to run it so it seem that PyCharm can connect to Docker but the build failed.
Try this:
First let’s see if PyCharm can connect to Docker (by the error you receive I think it does):
- Open the Services window (Alt + 8)
- Check if you can connect to “Docker” and see all the containers and images you have currently. You may need need to select “Docker” and press the play button on the left.
- If you can’t see the “Docker” option, clic on the “+” icon in that window and try to configure a new Docker connection.
Docker connection in PyCharm – Services window
If you can see your images and containers, you’re connected to Docker. Let’s see if your build fails:
- In the Project window (Alt + 1) right clic on your Dockerfile or Dockercompose.
- We are going to create a Run Configuration. Select the option “Create” that has a Docker icon. If you don’t see the option it means you already have one run configuration setup for that file and instead of the “Create” option you’ll see an “Edit” option.
- Select “Create” or “Edit” (depending on what options you see) and add the options you need for building and running your Dockerfile or Dockercompose and save the Run Configuration.
- Now you can try and run it from the Run bar at the top right corner (select the new run configuration you just made in the drop down and press play)
Now the Services window will get focused and show the build status. If it fails, you should see the reason there.
- How to get values of all object fields in Django?
- Django and Celery – ModuleNotFoundError: No module named 'celery.task'
- Django Generic Views: When to use ListView vs. DetailView
- How do you create a Django HttpRequest object with the META fields populated?
- Django dynamic urls
- {% load static %} and {% load staticfiles %}: which is preferred?
- Getting error with is_popup variable in django 1.9
- Grouping dates in Django
- Using existing field values in django update query
- Django test client response context None
-1đź‘Ť
This may also help (following https://www.jetbrains.com/help/pycharm/using-docker-as-a-remote-interpreter.html#prereq):
- check pycharm settings > Build > Docker > Tools
- The default docker executable was
C:\Program Files\Docker\Docker\resources\bin\docker.exe
(windows 10) - we have to select the file without
.exe
at the end
- Django i18n: how to not translate the admin site?
- Python Django custom template tags register.assignment_tag not working
- How to write unit tests for django-rest-framework api's?
- Django, Security and Settings
- Why is django's settings object a LazyObject?
- Calculate point based on distance and direction