3

I found this StackOverflow question but it wasn't answered so I ask it again.

I have a Go project running inside a Docker container. I got my code running in the container, and I expose it via HTTP.
The problem I have is with IntelliJ and dependencies auto-completion. Since all dependencies I have are managed by docker and downloaded inside the container, IntelliJ have no idea how to auto-complete the code and furthermore, it has no idea what methods are available so my code is full of errors in IntelliJ but runs fine in the container.

Is there a way to configure IntelliJ to bind it to the container sources? Maybe with docker volumes, but I would have to setup GOPATH, etc.. on my machine, which I would prefer to avoid.

R.J. Dunnill
  • 2,049
  • 3
  • 10
  • 21
Irindul
  • 398
  • 1
  • 6
  • 21
  • 1
    Just install the same dependencies on your local environment. Intellij/Golang synchronise dependencies automatically. Since you have the code that’s easy and simple. – georgeok Jun 13 '19 at 01:46
  • I've written an answer here [Using an IDE while developing on a docker container](https://stackoverflow.com/questions/46724661/using-an-ide-while-developing-on-a-docker-container/48785303#48785303) which mentions a few things. I think it's a different problem for the various languages / frameworks out there. – tgogos Jun 13 '19 at 08:08

0 Answers0