• Register
0 votes
629 views

Problem :

While installing a docker project from github facing following issue
package context: unrecognized import path "context" (import path does not begin with hostname)
6.9k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

This package context is only available in go versions 1.7 and after you try to check all the dockerfiles in your specified folders e.g. microservices-docker-go-mongodb-master in your link and change 

from golang:1.6 to golang:1.7

Next you need to change the port number of the db in your file docker-compose.yml

e.g.

from

image: mongo:3.3
container_name: cinema-db
ports:
  - "27017:27017"
volumes:
  - ./backup:/backup:rw 

to

ports:
- "27018:27018"

As you have already installed mongodb 27017 you must change it.

38.6k points