Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Merge pull request #25 from anarghya-das/master
Browse files Browse the repository at this point in the history
Upgrading Dockerfile with platform flag and ubuntu version
  • Loading branch information
NicholasMy authored Feb 16, 2023
2 parents 4852577 + 35cedf2 commit 34c6ca7
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions vmms/Dockerfile_CSE421
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM ubuntu:16.04
MAINTAINER Farshad Ghanei <farshadg@buffalo.edu>
#prerequisites
# Autolab - autograding docker image for CSE421/521 pintos

FROM --platform=amd64 ubuntu:18.04
LABEL maintainer="Farshad Ghanei <farshadg@buffalo.edu>"

# prerequisites
RUN apt-get update --fix-missing
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get install -y gcc make build-essential libcunit1-dev libcunit1-doc libcunit1 wget python qemu xorg-dev libncurses5-dev gdb git

# Install autodriver
WORKDIR /home
RUN useradd autolab
Expand All @@ -19,6 +23,7 @@ WORKDIR Tango/autodriver
RUN make clean && make
RUN cp autodriver /usr/bin/autodriver
RUN chmod +s /usr/bin/autodriver

###############################################
# configuraion and setup for bochs and pintos #
###############################################
Expand All @@ -31,23 +36,22 @@ RUN mkdir -p $DSTDIR/bin
ENV BXSHARE $DSTDIR/share/bochs
ENV PATH="${DSTDIR}/bin:${PATH}"

# These files may be put on a local server, but keep the folder structure
# Copies pintos skel from the reposity. These files will be replaced with user files when the container is run, but if its is removed here, it will not build.
# Something like: docker run --name pintos_container -v %cd%\pintos:/home/pintos/
WORKDIR $SRCDIR/
RUN git clone git://pintos-os.org/pintos-anon
RUN git clone git://pintos-os.org/pintos-anon && cd pintos-anon && git checkout 9f013d0930202eea99c21083b71098a0df64be0d
RUN mv pintos-anon/* $PINTOSDIR
#RUN wget http://web.stanford.edu/class/cs140/projects/pintos/pintos.tar.gz
#RUN tar -xzf pintos.tar.gz
#RUN mv pintos/* $PINTOSDIR

WORKDIR $SRCDIR/

# RUN wget http://www.oldlinux.org/Linux.old/bochs/Bochs/bochs-2.2.6/bochs-2.2.6.tar.gz
#RUN wget http://web.stanford.edu/class/cs140/projects/pintos/bochs-2.2.6.tar.gz

WORKDIR $PINTOSDIR/src/misc/
RUN ./bochs-2.6.11-build.sh /usr/local

WORKDIR $PINTOSDIR/src/utils/
RUN sed -i "5i GDBMACROS=$PINTOSDIR/src/misc/gdb-macros" pintos-gdb
RUN sed -i "5i GDBMACROS=$PINTOSDIR/src/misc/gdb-macros" $PINTOSDIR/src/utils/pintos-gdb
RUN sed -i "s/$sim = \"bochs\" if \!defined $sim/$sim = \"qemu\" if \!defined $sim/" $PINTOSDIR/src/utils/pintos
RUN make
RUN cp backtrace pintos pintos-gdb pintos-mkdisk Pintos.pm pintos-set-cmdline squish-pty squish-unix $DSTDIR/bin

Expand All @@ -60,5 +64,4 @@ RUN apt-get -y autoremove
RUN rm -rf Tango/
# Check installation
RUN ls -l /home
RUN which autodriver

RUN which autodriver

0 comments on commit 34c6ca7

Please sign in to comment.