forked from Astrabit-ST/ModShot-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-linux
36 lines (30 loc) · 2.38 KB
/
Dockerfile-linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# gcc10 doesn't like me, and it seems the official appimage is build using gcc 5.4.0-6ubuntu1~16.04.12
FROM conanio/gcc5
RUN conan remote add eliza "https://rkevin.jfrog.io/artifactory/api/conan/eliza" && \
conan remote add bincrafters "https://bincrafters.jfrog.io/artifactory/api/conan/public-conan" && \
conan config set general.revisions_enabled=1
RUN sudo apt update && DEBIAN_FRONTEND=noninteractive sudo apt install -y \
xorg-dev libx11-xcb-dev libxcb-render0-dev libxcb-render-util0-dev libgtk2.0-dev libxfconf-0-dev vim libwmf0.2-7-gtk librsvg2-common rsync patchelf dos2unix && \
sudo rm -rf /var/lib/apt/lists/*
RUN sudo python -m pip install mako pyqt5 pyinstaller
# install all dependencies for the conanfile in commit
COPY --chown=conan:root conanfile.py /tmp/install_deps/conanfile.py
RUN conan install --build=missing /tmp/install_deps && sudo rm -r /tmp/install_deps
ADD https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage /tmp
# can't find a stable release for linuxdeploy, oh well
ADD https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage /tmp
# avoid having to run appimages by itself
# we don't want to force CAP_SYS_ADMIN into the container if possible, but running appimages require FUSE
# instead, we extract it and pray it works (it actually does!)
RUN cd /tmp && sudo chmod 755 appimagetool-x86_64.AppImage linuxdeploy-x86_64.AppImage && \
./appimagetool-x86_64.AppImage --appimage-extract && sudo mv squashfs-root /usr/local/bin/appimagetool && \
./linuxdeploy-x86_64.AppImage --appimage-extract && sudo mv squashfs-root /usr/local/bin/linuxdeploy && \
sudo ln -s /usr/local/bin/appimagetool/AppRun /usr/local/bin/appimagetool-x86_64.AppImage && \
sudo ln -s /usr/local/bin/linuxdeploy/AppRun /usr/local/bin/linuxdeploy-x86_64.AppImage
ENTRYPOINT ["bash", "-c", "dos2unix /work/src/build-entrypoint-linux.sh && chmod +x /work/src/build-entrypoint-linux.sh && /work/src/build-entrypoint-linux.sh"]
# build this docker image as follows:
# docker build -t oneshot-build-linux .
# run this docker image as follows:
# docker run -i -v /path/to/modshot-core:/work/src -v /path/to/gamefiles:/work/data -v /path/to/distrubution/folder:/work/dist oneshot-build-linux
# example that worked for me:
# docker run -i -v ~/o/Modshot-Core:/work/src -v ~/o/OneShotBkup:/work/data -v ~/o/conanbuildtest:/work/dist oneshot-build-linux