Skip to content

Commit

Permalink
Update builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Jul 25, 2024
1 parent 29d4821 commit f27eedd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_template_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ jobs:
matrix:
include:
- arch: linux/amd64
tag: amd64
- arch: linux/arm64
tag: arm64
- arch: linux/arm/v7
tag: armv7
- arch: linux/arm/v6
tag: armv6
- arch: linux/ppc64le
tag: ppc64le
- arch: linux/s390x
tag: s390x
- arch: linux/i386
tag: i386

target: linux-i386
steps:
Expand Down Expand Up @@ -82,6 +89,6 @@ jobs:
VERSION=Python-${{steps.repository.outputs.pyv}}
PYTHON_VERSION=${{steps.repository.outputs.pyv}}
tags: |
ghcr.io/freva-clint/pyinstaller:py-${{ steps.repository.outputs.pyv }}
ghcr.io/freva-clint/pyinstaller:latest
ghcr.io/freva-clint/pyinstaller:py-${{ steps.repository.outputs.pyv }}-${{matrix.tag}}
ghcr.io/freva-clint/pyinstaller:latest-${{matrix.tag}}
platforms: ${{ matrix.arch }}
24 changes: 11 additions & 13 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Alpine 3.9.2 is 5 years old, so we might be lucky in terms of GLIBC.
FROM alpine:3.9.2
# Use a more recent version of Alpine if possible
FROM alpine:3.16

ARG VERSION
ARG PYTHON_VERSION=3.10.14
ARG PYTHON_VERSION=3.12.0

LABEL org.opencontainers.image.authors="DRKZ-CLINT"
LABEL org.opencontainers.image.source="https://github.com/FREVA-CLINT/freva-deployment.git"
LABEL org.opencontainers.image.version="$VERSION"
Expand All @@ -12,7 +13,7 @@ ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PYTHON_VERSION=${PYTHON_VERSION}

# Install necessary packages
# Install necessary packages and compile Python
RUN apk update && \
apk add --no-cache \
curl \
Expand All @@ -26,22 +27,19 @@ RUN apk update && \
openssl \
openssl-dev \
binutils \
git

# Download and compile Python
RUN curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
git && \
curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar xzf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure --enable-optimizations && \
make altinstall && \
cd .. && \
rm -rf Python-${PYTHON_VERSION} Python-${PYTHON_VERSION}.tgz &&\
rm -rf Python-${PYTHON_VERSION} Python-${PYTHON_VERSION}.tgz && \
rm -rf /var/cache/apk/*

# Set python3.8 as the default python3

RUN MAJOR_PYTHON=$(echo ${PYTHON_VERSION}|cut -d'.' -f1,2) && \
# Set python version symlinks
RUN MAJOR_PYTHON=$(echo ${PYTHON_VERSION} | cut -d'.' -f1,2) && \
ln -s /usr/local/bin/python${MAJOR_PYTHON} /usr/bin/python3 && \
ln -s /usr/local/bin/python${MAJOR_PYTHON} /usr/bin/python && \
/usr/local/bin/python${MAJOR_PYTHON} -m ensurepip --upgrade && \
/usr/local/bin/python${MAJOR_PYTHON} -m pip install --no-cache-dir pyinstaller
/usr/local/bin/python${MAJOR_PYTHON} -m pip install -U pip setuptools

0 comments on commit f27eedd

Please sign in to comment.