Coder Social home page Coder Social logo

camerondurham / cs350-docker Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 6.0 354 KB

Docker container and run scripts for MIT's xv6 kernel. Useful for USC CSCI 350.

Shell 40.71% Dockerfile 26.57% Makefile 8.71% PowerShell 24.01%
docker docker-image operating-systems usc xv6 unix docker-desktop development-environment dockerfile mit-xv6 operating-system operating-system-learning

cs350-docker's Issues

Make distinction between run script and `ch` instructions

Instructions for using run.{sh,ps1} shell scripts vs ch are unclear.

Describe the solution you'd like
Make clear distinction between run script and ch instructions. Ideally instructions should be in different headers even if it means a longer readme. IMHO having 2 sets of instructions under each step is confusing.

Example: unclear for new users whether they need to edit run.{sh,ps1} script if using ch.

Fix Failed Workflow

Describe the bug

Failed workflow building and publishing image: https://github.com/camerondurham/cs350-docker/runs/3476950995?check_suite_focus=true

To Reproduce
Steps to reproduce the behavior:

  1. Build Docker image

Docker build fails with following error, need to run in Ubuntu environment to reproduce:

Error: buildx failed with: error: failed to solve: process "/bin/bash -o pipefail -c apt-get update && apt-get install -y --no-install-recommends     apt-utils=1.6.13     build-essential=12.4ubuntu1     cmake=3.10.2-1ubuntu2.18.04.1     g++=4:7.4.0-1ubuntu2.3     gcc=4:7.4.0-1ubuntu2.3     gcc-multilib=4:7.4.0-1ubuntu2.3     gdb=8.1.1-0ubuntu1     gdbserver=8.1.1-0ubuntu1     openssh-server=1:7.6p1-4ubuntu0.3     qemu=1:2.11+dfsg-1ubuntu7.36     qemu-system-common=1:2.11+dfsg-1ubuntu7.36     rsync=3.1.2-2.1ubuntu1.1     && apt-get autoclean -y     && apt-get autoremove -y     && rm -rf /var/lib/apt/lists/*     && mkdir /var/run/sshd     && echo 'root:root' | chpasswd     && sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config     && sed 's@session\\s*required\\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd" did not complete successfully: exit code: 100

Publish image to AWS ECR and Sign Image Build

Describe the solution you'd like
Consider pushing image to public ECR and monitoring/limiting pulls to avoid excess charges. See AWS ECR Free Tier.

This image should ideally be signed whether going to AWS or Docker Hub. Should look into this project: https://github.com/sigstore/cosign

Additional context
Not sure exactly why I want to do this besides learning how to write a gh workflow to do this without risking excess AWS charges. Should be really simple. Also, ECR should have less restrictive pull rate limiting (citation needed).

xv6 stuck on qemu-system-i386 Mac M1 and M2 Chip

It is the same error as "xv6 stuck on qemu-system-i386 Windows" error under Troubleshooting section causing make qemu-nox to fail but for Mac M1 and M2 chip.
Seems to be with the latest update of Mac OS. Also, it didn't occur on Mac M1 chip in previous semesters.
Error: qemu-system-i386 -nographic -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512 rosetta error: Unimplemented syscall number 282

ch create for csci350 errors out, but run_scripts workflow works for some people

Describe the bug

When running the ch command from cs350-docker to create the csci350 container, it produces the following error:

v1: Pulling from camerondurham/cs350-docker Cannot create new environment. Error from Dockerfile build: no matching manifest for linux/arm64/v8 in the manifest list entries

To Reproduce

Simply using the ch create command from cs350-docker causes this issue to appear. The issue states no manifest for linux/arm64/v8 -- I'm not entirely sure about this but I think it is attempting to use my host platform as the image's platform?

This issue does not occur when using the run_scripts workflow, which works completely fine!

Screenshots

Running with ./run.sh start:
image

Running with ch create:
image

Desktop (please complete the following information):

  • OS: MacOS v13.0.1
  • Latest Docker Version (just updated)

Additional context
While run_scripts workflow is working for me, some other students are complaining that it doesn't work for them either. They are running into the same issue as before:

./run.sh start

Running Docker image

[+] Running 0/1

โ ‡ gdbserver Pulling 2.9s

no matching manifest for linux/arm64/v8 in the manifest list entries

Use specific version over Docker latest tag

Docker's :latest tag is unreliable and confusing. The tag is not actually implemented to mean the "most recent" image since it's just an ordinary tag. See this article which goes into much more detail about why :latest is an anti-pattern.

Should use tagged versioning via git like the camerondurham/ch repo's CI or use tags representing the base ubuntu version.

Publish to Docker Hub

  • Publish cs350-docker image on Docker Hub for public use
  • Add sample Dockerfile/docker-compose solution

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.