Skip to content

Commit

Permalink
Install python from src
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Feb 6, 2025
1 parent 6c15c31 commit d630a8c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Prepare
id: prepare
run: |
Expand Down
51 changes: 48 additions & 3 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,67 @@
FROM alpine:3.16
# Add global TARGETARCH argument to this stage
ARG TARGETARCH
ENV PYTHON_VERSION=3.12.4
LABEL maintainer="Miguel Caballer <[email protected]>"
LABEL description="Container image to build faas-supervisor in alpine"
#RUN apk add --no-cache nghttp2-libs binutils libexecinfo-dev libcurl zip unzip cmake automake make curl-dev libtool autoconf gcc g++ zlib-dev musl-dev py3-pip python3 python3-dev libxml2-dev libxslt-dev
RUN apk add --no-cache python3 python3-dev autoconf libcurl curl zip unzip cmake make automake curl-dev libtool autoconf gcc g++ libexecinfo-dev
RUN apk add --no-cache \
build-base \
libffi-dev \
zlib-dev \
bzip2-dev \
readline-dev \
ncurses-dev \
sqlite-dev \
tk-dev \
libssl1.1 \
openssl-dev \
musl-dev \
curl \
git \
xz-dev \
make \
gcc \
g++ && \
curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar -xvzf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure \
--prefix=/usr/ \
--enable-shared \
--enable-optimizations \
--enable-ipv6 \
LDFLAGS=-Wl,-rpath=/usr/lib,--disable-new-dtags && \
make && \
make install && \
rm -rf /Python-${PYTHON_VERSION} && \
apk del \
build-base \
libffi-dev \
zlib-dev \
bzip2-dev \
readline-dev \
ncurses-dev \
sqlite-dev \
tk-dev \
libssl1.1 \
openssl-dev \
musl-dev \
git \
xz-dev

RUN apk add --no-cache autoconf libcurl zip unzip cmake make automake curl-dev libtool autoconf libexecinfo-dev
RUN python3 -m ensurepip
RUN pip3 --no-cache-dir install --upgrade pip setuptools>=40.8.0
RUN pip3 --no-cache-dir install pyinstaller
RUN pip3 install --no-deps --ignore-installed wheel==0.37.1
RUN apk add --no-cache --virtual .build-deps gcc musl-dev \
&& pip3 install cython \
&& apk del .build-deps
RUN pip3 --no-cache-dir install awslambdaric==2.0.12
RUN pip3 --no-cache-dir install boto3==1.20.38 \
webdavclient3==3.14.6 \
requests==2.27.1 \
setuptools>=40.8.0 \
wheel==0.37.1 \
pyyaml==6.0.1 \
awslambdaric==2.0.12 \
rucio-clients==1.31.7

0 comments on commit d630a8c

Please sign in to comment.