2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

python:3.8-alpineでException: you need a C compiler to build uWSGIエラーへの対処

Last updated at Posted at 2020-10-23

Dockerのイメージ作成の際に、
python:3.8-alpineで、Exception: you need a C compiler to build uWSGI エラーが出た場合の対処方を記載

1.以下の記述だとエラーになる
(Exception: you need a C compiler to build uWSGI)

dockerfile
FROM python:3.8-alpine

RUN addgroup -S uwsgi && adduser -S -G uwsgi uwsgi
RUN pip install Flask==0.10.1 uWSGI

2.以下の文でgccを追加する
RUN apk add gcc build-base linux-headers

dockerfile
FROM python:3.8-alpine

RUN apk add gcc build-base linux-headers
RUN addgroup -S uwsgi && adduser -S -G uwsgi uwsgi
RUN pip install Flask==0.10.1 uWSGI

以上

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?