python app 을 docker 환경에서 기동하기위해 빌드하는 도중 에러가 발생했다.

 

핵심구문은 PEP 517 문제인듯.

ERROR: Could not build wheels for pymssql which use PEP 517 and cannot be installed directly

 

 

[해결방법]

freetds 설치 + 삽질1 + 삽질3

아래는 해결된 Dockerfile 예시이다.

FROM python:3.7.10-alpine

WORKDIR /usr/src/app

RUN apk add gcc g++ make musl-dev python3-dev freetds-dev
RUN apk add --update gcc libc-dev linux-headers && rm -rf /var/cache/apk/*

COPY requirements.txt ./
RUN pip install --upgrade pip setuptools wheel
RUN pip install -r requirements.txt

# Copy Application Source Files
COPY . .

# Application Port
EXPOSE 7501

CMD ["python", "./myapp.py"]

 

 

[삽질기록]

1. pip 업그레이드

$ pip install --upgrade pip setuptools wheel

시도해봤으나 해결되지 않음

 

2. pip 다운그레이드

$ pip install pip==18.1

시도해봤으나 해결되지 않음

 

3. 패키지 업그레이드

$ apk add --update gcc libc-dev linux-headers && rm -rf /var/cache/apk/*

libc-dev 와 linux-headers 는 추가 설치됨

시도해봤으나 해결되지 않음

 

 

반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기