Signed-off-by: Jessica Frazelle <princess@docker.com>
This commit is contained in:
Jessica Frazelle 2015-06-20 17:32:13 -07:00
parent 30102dc692
commit ff502042f6
4 changed files with 60 additions and 9 deletions

38
nes/Dockerfile Normal file
View File

@ -0,0 +1,38 @@
# NES emulator in a container
#
# docker run --rm -d \
# --device /dev/snd \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -e DISPLAY=unix$DISPLAY \
# --device /dev/dri \
# jess/nes /games/zelda.rom
#
FROM debian:sid
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apt-get update && apt-get install -y \
binutils \
ca-certificates \
gcc \
git \
golang \
libgl1-mesa-dev \
libgl1-mesa-dri \
libxcursor-dev \
libxi-dev \
libxinerama-dev \
libxrandr-dev \
mercurial \
portaudio19-dev \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& ldconfig
ENV GOPATH /go
ENV PATH /go/bin:$PATH
RUN go get github.com/fogleman/nes
COPY games /games
ENTRYPOINT [ "nes" ]

Binary file not shown.

BIN
nes/games/zelda.rom Normal file

Binary file not shown.

View File

@ -12,28 +12,41 @@
# # Build termboy image # # Build termboy image
# docker build -t termboy . # docker build -t termboy .
# #
# docker run -it termboy # docker run -it \
# --device /dev/snd \
# termboy
# #
# Base docker image # Base docker image
FROM debian:jessie FROM debian:jessie
MAINTAINER Jessica Frazelle <jess@docker.com> MAINTAINER Jessica Frazelle <jess@docker.com>
ENV TERM linux
ENV HOME /root
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
COPY termboy-go /usr/bin/termboy-go
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
ca-certificates \
console-setup \
console-setup-linux \
g++ \
git \
kbd \ kbd \
libasound2-dev \
libncurses5-dev \
libncursesw5-dev \
make \
sudo \
--no-install-recommends \ --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/*
&& mkdir -p $HOME/.config/termboy
RUN git clone https://github.com/dobyrch/termboy --depth 1 /src \
&& cd /src \
&& make \
&& make install || true
# add games # add games
COPY games $HOME/games COPY games /games
# Autorun termboy # Autorun termboy
ENTRYPOINT ["/usr/bin/termboy-go"] ENTRYPOINT ["/usr/bin/termboy"]