2👍
I use Eclipse from within the container.
You don’t need to. The purpose of the container is to provide you with a compilation environment. As long as you can share files between the container and host, all code editing can happen from your local eclipse.
So the question is how do you share files? Via volumes. The simplest way is to say docker run -v <hostdir>:<containerdir>
.
1👍
First, I’d like to thank @Timir for leading me to the correct answer and helping me realize that I do not need to run Eclipse from within the container. Trying to do so was just a fundamental misunderstanding about what Docker is for, as this issue came about soon after beginning to learn Docker in the first place. You can call me a noob, it’s fine, you’re not wrong..but on to the resolution.
In my case, what I did was create a volume with docker volume create <volume name I chose>
and mounted the volume to the container’s /usr/ directory in the run command like so: -v <volume name I chose>:/usr
.
Next, in Eclipse I navigated to window > preferences > pydev> interpreters > python interpreter > new. Then, I just went to the directory on my host machine where docker volumes live – on my CentOS 7 host, that is /var/lib/docker/volumes/<volume name I chose>/_data/bin/python3.5
-chose that location and gave it a name. Then when I created a given PyDev project, I just chose the interpreter I created and I was in business.
- [Django]-Can I deploy both python 2 and 3 django app with apache using mod_wsgi?
- [Django]-New-line character seen in unquoted field
- [Django]-The model FlatPage is already registered
- [Django]-Schemamigration/refactor model using south
- [Django]-How to get the count of objects in ManyToMany field in template