Giter Club home page Giter Club logo

retropie-docker's Introduction

retropie-docker

Docker resources to run Retropie Install script as a container, and game using Retropie on Linux without the need of dual-boot

Note that it is implicit that you might need to have docker daemon already running, or any additional software that is capable of handling docker images like podman(podman-docker might also be handy to help with cli syntax)

Install the xhost command on your desktop as well.

How to build the image

git clone --depth=1 https://github.com/nwildner/retropie-docker.git
cd retropie-docker
docker build -t retropie-docker .

This will build an image that is currently based on Ubuntu LTS 20.04 from official docker images because, this is a requisite for Retropie. Needs further testing if this could be done with a Debian image as well.

Ubuntu 22.04 is not supported due to an SDL2 bug that is making retroarch autoconfiguraton steps break.

Running a container instance of this image

Take a look at the cmd.sh file from this repo, and change the directories to one that will better reflect the location you want to keep your Roms, BIOS, User local EmulationStation dir (es_homedir_config), Global Emulationstation config (es_config) and Retroarch autogenerated controler files(retroarch_autoconfig).

These are pretty much the places you need to keep on your home directory after kill out your container.

To run:

$ chmod +x cmd.sh
$ ./cmd.sh

If you have first started EmulationStation, it will clean-up all controller config data as per entrypoint.sh. After that, EmulationStation will be launched. cmd.sh script will also set the permissions for the docker process to access X with the xhost utility.

Currently known issues

So far, you'll have to map your local paths inside cmd.sh while we develop something like a config file.

retropie-docker's People

Contributors

nwildner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

retropie-docker's Issues

Building image fails on raspberry pi 4 with Raspbian OS

Docker build does not work on Raspbian OS with raspberry pi 4

...
#0 7566.9 libretro/libretro.c: In function 'retro_init':
#0 7566.9 libretro/libretro.c:1023:2: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result]
#0 7566.9  1023 |  posix_memalign((void**)&GFX.Screen, 16, GFX.Pitch * 512 * sizeof(uint16));
#0 7566.9       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 7566.9 libretro/libretro.c:1024:2: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result]
#0 7566.9  1024 |  posix_memalign( (void**)&ntsc_screen_buffer, 16, GFX.Pitch * MAX_SNES_HEIGHT * sizeof(uint16_t) );
#0 7566.9       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 7566.9 Cloning into '/home/pi/RetroPie-Setup/tmp/build/lr-stella2014'...
#0 7566.9 stella/src/emucore/Console.cxx: In member function 'void Console::loadUserPalette()':
#0 7566.9 stella/src/emucore/Console.cxx:749:78: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
#0 7566.9   749 |     uInt32 pixel = ((int)pixbuf[0] << R_SHIFT) + ((int)pixbuf[1] << G_SHIFT) + (int)pixbuf[2] << B_SHIFT;
#0 7566.9       |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
#0 7566.9 stella/src/emucore/Console.cxx:755:78: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
#0 7566.9   755 |     uInt32 pixel = ((int)pixbuf[0] << R_SHIFT) + ((int)pixbuf[1] << G_SHIFT) + (int)pixbuf[2] << B_SHIFT;
#0 7566.9       |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
#0 7566.9 stella/src/emucore/Console.cxx:763:78: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
#0 7566.9   763 |     uInt32 pixel = ((int)pixbuf[0] << R_SHIFT) + ((int)pixbuf[1] << G_SHIFT) + (int)pixbuf[2] << B_SHIFT;
#0 7566.9       |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
#0 7566.9 Cloning into '/home/pi/RetroPie-Setup/tmp/build/lr-vba-next'...
#0 7566.9 Cloning into '/home/pi/RetroPie-Setup/tmp/build/lr-vecx'...
#0 7566.9 e8910.c: In function 'e8910_callback':
#0 7566.9 e8910.c:511:22: warning: comparison is always false due to limited range of data type [-Wtype-limits]
#0 7566.9   511 |     if (PSG.CountEnv < 0)
#0 7566.9       |                      ^
#0 7566.9 E: Unable to locate package insserv
#0 7566.9 E: Package 'omxplayer' has no installation candidate
#0 7566.9 Could not install package(s): insserv omxplayer.
------
Dockerfile:17
--------------------
  16 |     WORKDIR /home/pi
  17 | >>> RUN git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git \
  18 | >>>     && cd RetroPie-Setup \
  19 | >>>     && sudo chmod +x retropie_setup.sh \
  20 | >>>     && sudo chmod +x retropie_packages.sh \
  21 | >>>     && sudo ./retropie_packages.sh setup basic_install
  22 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git     && cd RetroPie-Setup     && sudo chmod +x retropie_setup.sh     && sudo chmod +x retropie_packages.sh     && sudo ./retropie_packages.sh setup basic_install" did not complete successfully: exit code: 1

This happens even after a fresh install of 32 bit raspbian image using official rpi image downloader. I believe this is due to raspbian automatically booting on 64 bit mode (cannot find the source where i read this though)

Here is the output of "uname -a":
Linux turtlevan 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

But the output of "getconf LONG_BIT" is 32, which seems to suggest something is not right with the os installation after all.

Explicitly specifying the platform in the dockerfile by changing the first line to
FROM --platform=linux/armhf ubuntu:20.04
does not seem to have any effect, the build fails with the same reason

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.