forked from ps3dev/ps3toolchain
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d23a17
commit 16a0243
Showing
1 changed file
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,46 @@ | ||
FROM ubuntu:24.04 | ||
LABEL maintainer="miigotu@gmail.com" | ||
FROM ubuntu:22.04 as builder | ||
|
||
# Set the default shell to Bash | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV PS3DEV /usr/local/ps3dev | ||
ENV PSL1GHT ${PS3DEV} | ||
ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin | ||
ENV PKG_CONFIG_PATH $PS3DEV/portlibs/ppu/lib/pkgconfig | ||
ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
# last python version with diskutils module support | ||
ENV PYTHON_VERSION=3.10 | ||
ENV PYENV_ROOT="$HOME/.pyenv" | ||
ENV PYENV_ROOT ${HOME}/.pyenv | ||
ENV PIP_ROOT_USER_ACTION=ignore | ||
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" | ||
ENV PATH ${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:$PATH | ||
|
||
RUN \ | ||
apt -y update && \ | ||
apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ | ||
ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ | ||
libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev nvidia-cg-toolkit && \ | ||
# Install dependencies specific for amd64 architecture | ||
if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi ; \ | ||
# pyenv | ||
apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | ||
llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl && \ | ||
curl https://pyenv.run | bash && \ | ||
pyenv update && \ | ||
pyenv install $PYTHON_VERSION && \ | ||
pyenv global $PYTHON_VERSION && \ | ||
pyenv rehash && \ | ||
pip install pycrypto && \ | ||
# pyenv | ||
apt -y clean autoclean autoremove | ||
|
||
RUN mkdir /build | ||
RUN apt update -y && \ | ||
apt --no-install-recommends install -y autoconf automake bison build-essential bzip2 \ | ||
ca-certificates cmake flex gettext-base git libelf-dev libgmp3-dev libncurses5-dev libssl-dev \ | ||
libtool libtool-bin make patch pkg-config texinfo wget xz-utils zlib1g-dev && \ | ||
# Fixes certificate errors with letsencrypt in ARMv7 | ||
echo 'ca_certificate=/etc/ssl/certs/ca-certificates.crt' >> /etc/wgetrc && \ | ||
# Install dependencies specific for amd64 architecture | ||
if [ "$(uname -m)" = "x86_64" ]; then apt install -y nvidia-cg-toolkit ; fi && \ | ||
# pyenv | ||
apt --no-install-recommends install -y zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | ||
llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev curl git && \ | ||
echo 'cacert=/etc/ssl/certs/ca-certificates.crt' >> ~/.curlrc && \ | ||
git config --global http.sslverify 'false' && \ | ||
curl https://pyenv.run | bash && \ | ||
pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && \ | ||
pip install pycrypto && \ | ||
# pyenv | ||
apt -y clean autoclean autoremove && \ | ||
mkdir /build | ||
WORKDIR /build | ||
COPY . /build | ||
RUN /build/toolchain.sh | ||
|
||
# Fixes certificate errors with letsencrypt in ARMv7 | ||
RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc | ||
RUN /build/toolchain.sh && rm -rf /build/build | ||
FROM ubuntu:22.04 as runtime | ||
ENV PS3DEV /usr/local/ps3dev | ||
ENV PSL1GHT ${PS3DEV} | ||
ENV PATH ${PATH}:${PS3DEV}/bin:${PS3DEV}/ppu/bin:${PS3DEV}/spu/bin:${PS3DEV}/portlibs/ppu/bin | ||
ENV PKG_CONFIG_PATH ${PS3DEV}/portlibs/ppu/lib/pkgconfig | ||
COPY --from=builder ${PS3DEV} ${PS3DEV} |