Quand j'ai essayé de mettre la dernière version de google-cloud-bigquery
dans la dernière version de python * alpine, l'installation a échoué avec l'erreur suivante. Enfin, quand je l'ai fait comme` Dockerfile après modification, c'était sûr. J'ai pu l'installer.
Dockerfile
FROM python:3.9.0-alpine3.12
RUN apk --update add \
curl \
bash
RUN apk --update add tzdata && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN curl -sSL https://sdk.cloud.google.com | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin
RUN mkdir -p /src
FROM python:3.9.0-alpine3.12
RUN apk --update add \
curl \
gcc \
musl-dev \
linux-headers \
build-base \
libffi-dev \
bash
RUN apk --update add tzdata && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN curl -sSL https://sdk.cloud.google.com | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin
error: command 'gcc' failed: No such file or directory
fatal error: limits.h: No such file or directory
fatal error: ffi.h: No such file or directory
requirements.txt
google-cloud-bigquery==2.4.0
Dockerfile
FROM python:3.9.0-alpine3.12
RUN apk --update add \
curl \
gcc \
musl-dev \
linux-headers \
build-base \
libffi-dev \
bash
RUN apk --update add tzdata && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN curl -sSL https://sdk.cloud.google.com | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin
RUN mkdir -p /src
FROM python:3.9.0-alpine3.12
RUN apk --update add \
curl \
gcc \
musl-dev \
linux-headers \
build-base \
libffi-dev \
bash
RUN apk --update add tzdata && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN curl -sSL https://sdk.cloud.google.com | bash
ENV PATH $PATH:/root/google-cloud-sdk/bin