I'm running boot2docker on a Mac for my development. I built a Docker image containing a Jetty server which is connecting to elasticsearch at localhost
together with Redis and MySQL.
I'm running docker-compose with a host bridge configuration which looks like the following:
api:
image: api
ports:
- "8080:8080"
environment:
JETTY_ENVIRONMENT: dev
net: "host"
What I want is accessing elasticsearch which I installed on my Mac via localhost:9200
.
Try this? I know we're not supposed to answer with links, but I thought it'd be OK since it's a link to a boot2docker file on Github.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.