Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 코로나19
- Docker
- 금융문자분석경진대회
- Real or Not? NLP with Disaster Tweets
- SW Expert Academy
- dacon
- 프로그래머스 파이썬
- Kaggle
- 파이썬
- 더현대서울 맛집
- 프로그래머스
- github
- gs25
- 백준
- 편스토랑
- Baekjoon
- programmers
- 맥북
- leetcode
- hackerrank
- Git
- 데이콘
- 편스토랑 우승상품
- 우분투
- PYTHON
- 캐치카페
- ChatGPT
- 자연어처리
- ubuntu
- AI 경진대회
Archives
- Today
- Total
목록
반응형
Docker network host (1)
반응형
솜씨좋은장씨
[Docker] flask API Docker Container에서 localhost의 Elasticsearch 연결 시 발생하는 ConnectionError 해결방법
Elasticsearch가 설치된 서버와 api를 실행할 서버가 같으면서 개발한 API 에서 Elasticsearch를 연결할 때 es_client = Elasticsearch("http://localhost:9200") 위와 같이 Python과 Elasticsearh 라이브러리를 활용하여 연결하는 경우 Python과 Flask를 활용하여 개발한 API를 담은 이미지를 만들고 docker run -it -d --name api_contatiner -p 5000:5000 api_image 위의 명령어를 활용하여 container로 실행한 후 http://localhost:5000/search?query=%EC%95%88%EB%85%95 query를 보내 호출을 하려고하면 app.py가 실행되면서 Elast..
Programming/Docker
2020. 5. 12. 13:52
반응형