Skip to content

Instantly share code, notes, and snippets.

@SamRH
Last active April 23, 2022 07:58
Show Gist options
  • Save SamRH/0f8267e482e73ac4a67f043c4445e9ae to your computer and use it in GitHub Desktop.
Save SamRH/0f8267e482e73ac4a67f043c4445e9ae to your computer and use it in GitHub Desktop.
Containerfile for building PCSX2
# Containerfile (aka Dockerfile) with all deps for building PCSX2
#
# `docker build -f Containerfile -t pcsx2-builder`
# `docker run -v .:/build:Z pcsx2-builder bash -c './build.sh --clean --release --lto -DQT_BUILD=TRUE'`
#
# Using podman instead of docker is fine too just make sure to `podman unshare chown 1001:1001 /path/to/pcsx2src` before running
# and `podman unshare chown -R 0:0 /path/to/pcsx2src` after.
FROM docker.io/ubuntu:20.04
# deps for building PCSX2
RUN env DEBIAN_FRONTEND=noninteractive apt-get -y update && env DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --no-install-suggests -y install build-essential cmake libaio-dev libbz2-dev libegl1-mesa-dev \
libgdk-pixbuf2.0-dev libgl1-mesa-dev libgtk-3-dev libharfbuzz-dev libjpeg-dev liblzma-dev \
libpcap0.8-dev libpng-dev libpulse-dev librsvg2-dev libsamplerate0-dev libsoundtouch-dev \
libudev-dev libwxgtk3.0-gtk3-dev libx11-xcb-dev pkg-config portaudio19-dev zlib1g-dev clang \
ninja-build g++-10-multilib clang-9 libstdc++-10-dev python3 python3-pip python-is-python3 libglib2.0-0
# older versions of Ubuntu (below 22.04) only have QT5...
# AQT installer is an unnofficial installer but uses official mirrors
# and doesn't require an account :) https://github.com/miurahr/aqtinstall
RUN pip install aqtinstall
RUN aqt install-qt -O /opt/qt linux desktop 6.2.0 gcc_64
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
RUN useradd -u 1001 -ms /bin/bash user
USER user
WORKDIR /build
ENV Qt6_DIR=/opt/qt/6.2.0/gcc_64/lib/cmake/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment