Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on AMR64 Oracle #7

Open
mstoimenof opened this issue Sep 23, 2024 · 5 comments
Open

Working on AMR64 Oracle #7

mstoimenof opened this issue Sep 23, 2024 · 5 comments

Comments

@mstoimenof
Copy link

mstoimenof commented Sep 23, 2024

Use the official Ubuntu 22.04 as the base image

FROM ubuntu:22.04

Set environment variables to avoid interactive prompts

ENV DEBIAN_FRONTEND=noninteractive
ENV CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5

Install necessary dependencies

RUN apt-get update &&
apt-get install -y
git
cmake
ninja-build
pkg-config
ccache
clang
llvm
lld
binfmt-support
libsdl2-dev
libepoxy-dev
libssl-dev
python-setuptools
g++-x86-64-linux-gnu
nasm
python3-clang
libstdc++-10-dev-i386-cross
libstdc++-10-dev-amd64-cross
libstdc++-10-dev-arm64-cross
squashfs-tools
squashfuse
libc-bin
expect
curl
sudo
fuse
qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
qtdeclarative5-dev qml-module-qtquick2
binfmt-support

Create a new user and set their home directory

RUN useradd -m -s /bin/bash fex

RUN usermod -aG sudo fex

RUN echo "fex ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/fex

USER fex

WORKDIR /home/fex

Clone the FEX repository and build it

RUN git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git &&
cd FEX &&
mkdir Build &&
cd Build &&
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False -G Ninja .. &&
ninja

WORKDIR /home/fex/FEX/Build

Run ninja install and enable binfmt_misc without systemd

RUN sudo ninja install &&
sudo update-binfmts --enable

RUN sudo useradd -m -s /bin/bash steam

RUN sudo apt install wget

USER root

RUN echo 'root:steamcmd' | chpasswd

USER steam

WORKDIR /home/steam/.fex-emu/RootFS/

Set up rootfs

RUN wget -O Ubuntu_22_04.tar.gz https://www.dropbox.com/scl/fi/16mhn3jrwvzapdw50gt20/Ubuntu_22_04.tar.gz?rlkey=4m256iahwtcijkpzcv8abn7nf

RUN tar xzf Ubuntu_22_04.tar.gz

RUN rm ./Ubuntu_22_04.tar.gz

WORKDIR /home/steam/.fex-emu

RUN echo '{"Config":{"RootFS":"Ubuntu_22_04"}}' > ./Config.json

WORKDIR /home/steam/Steam

Download and run SteamCMD

RUN curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

ENTRYPOINT FEXBash ./steamcmd.sh

@RainyZombie
Copy link

RainyZombie commented Sep 28, 2024

Thank you! was able to get it to run with 1-2 tiny modifications

Who has any issues with the above try the following:


FROM ubuntu:22.04



ENV DEBIAN_FRONTEND=noninteractive

ENV CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5



RUN apt-get update && \

    apt-get install -y \

    git \

    cmake \

    ninja-build \

    pkg-config \

    ccache \

    clang \

    llvm \

    lld \

    binfmt-support \

    libsdl2-dev \

    libepoxy-dev \

    libssl-dev \

    python-setuptools \

    g++-x86-64-linux-gnu \

    nasm \

    python3-clang \

    libstdc++-10-dev-i386-cross \

    libstdc++-10-dev-amd64-cross \

    libstdc++-10-dev-arm64-cross \

    squashfs-tools \

    squashfuse \

    libc-bin \

    expect \

    curl \

    sudo \

    fuse \

    qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools \

    qtdeclarative5-dev qml-module-qtquick2 \

    binfmt-support



RUN useradd -m -s /bin/bash fex && \

    usermod -aG sudo fex && \

    echo "fex ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/fex



USER fex



WORKDIR /home/fex



RUN git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git && \

    cd FEX && \

    mkdir Build && \

    cd Build && \

    CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_LINKER=lld -DENABLE_LTO=True -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False -G Ninja .. && \

    ninja



WORKDIR /home/fex/FEX/Build



RUN sudo ninja install && \

    sudo update-binfmts --enable



RUN sudo useradd -m -s /bin/bash steam && \

    sudo apt-get update && \

    sudo apt-get install -y wget



USER root



RUN echo 'root:steamcmd' | chpasswd



USER steam



WORKDIR /home/steam/.fex-emu/RootFS/



RUN wget -O Ubuntu_22_04.tar.gz https://www.dropbox.com/scl/fi/16mhn3jrwvzapdw50gt20/Ubuntu_22_04.tar.gz?rlkey=4m256iahwtcijkpzcv8abn7nf && \

    tar xzf Ubuntu_22_04.tar.gz && \

    rm ./Ubuntu_22_04.tar.gz



WORKDIR /home/steam/.fex-emu



RUN echo '{"Config":{"RootFS":"Ubuntu_22_04"}}' > ./Config.json



WORKDIR /home/steam/Steam



RUN curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -



ENTRYPOINT FEXBash ./steamcmd.sh

@fund440
Copy link

fund440 commented Sep 29, 2024

@RainyZombie I got Ubuntu. Ubuntu_22_04.tar.gz: Permission denied with your Dockerfile, any solution?

Edit: I think its permissions issue, user steam, how to fix it?

@RainyZombie
Copy link

RainyZombie commented Sep 29, 2024

@fund440 Ubuntu_22_04.tar.gz should be downloaded in /home/steam/.fex-emu/RootFS/ where user steam should have permission, are you sure you used the dockerfile I posted and there are no previous errors before the permission denied one about the ubuntu archive?

@fund440
Copy link

fund440 commented Sep 30, 2024

@fund440 Ubuntu_22_04.tar.gz should be downloaded in /home/steam/.fex-emu/RootFS/ where user steam should have permission, are you sure you used the dockerfile I posted and there are no previous errors before the permission denied one about the ubuntu archive?

I fixed it by running doing this

RUN mkdir -p /home/steam/.fex-emu/RootFS/
RUN chown -R steam:steam /home/steam/.fex-emu
RUN chmod -R 755 /home/steam/.fex-emu

USER steam

WORKDIR /home/steam/.fex-emu/RootFS/

I did this too to /home/steam/Steam

idk why I copied your exact Dockerfile 😅

@mstoimenof
Copy link
Author

You can put on
'ENTRYPOINT FEXBash'
then just attach on container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants