cis548 / docker-env Goto Github PK
View Code? Open in Web Editor NEWA dockerized development environment for MCIT-595
A dockerized development environment for MCIT-595
Create an open-source, step-by-step tutorial to set up Docker on Windows and Mac OS by Bookdown.
please change the master branch to main, and also be sure to update the branch protection rule
We suggest to students to use netstat
which requires installing net-tools
with sudo permissions. Some students are scared to modify the docker environment, so we should just install this for them from the get-go.
The demo is showing how to use "netstat" to see ports in use, etc. When I tried to run this, I received a message that "netstat: command not found."
Based on an internet search, I tried installing netstat with
$ sudo apt update
$ sudo apt install net-toolsThe terminal then asked for a password for cit595. I didn't recall setting any ubuntu password, and was nervous about trying to reset docker.
Any suggestions?
Based on #7, we should make it more clear in the instruction to use the PowerShell launch Docker container, not WSL2.
The Windows instruction is here.
We currently have multiple resources for Git and Github, some mentioning/using Vagrant.
In Week 1:
Code Version Control - this is Boon's lecture and is high level and no mention of Vagrant. Definitely keep this.
TA Demo: Project 0 Git - this one explicitly uses Vagrant.
TA Demo: Command Line - this also explicitly uses Vagrant.
Best to replace the above with a newly demo or demos before Spring 2022.
In Resources:
Please add zip
to the docker environment. So we can use the deploy script
OS: Window 10
When creating the ssh key, it says Could not create directory '/home/cit595/.ssh': Permission denied
.
cit595@ba27ad01f3a3:~$ ssh-keygen -t ed25519 -C "[email protected]"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/cit595/.ssh/id_ed25519):
Could not create directory '/home/cit595/.ssh': Permission denied
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "/home/cit595/.ssh/id_ed25519" failed: No such file or directory
We did not change the ownership of cit595
to new user cit595 so /home/cit595
still belongs to root
cit595@ba27ad01f3a3:/home$ ls -al
total 8
drwxr-xr-x 1 root root 4096 May 25 20:15 .
drwxr-xr-x 1 root root 4096 Sep 2 03:21 ..
drwxr-xr-x 2 root root 40 Sep 2 03:21 cit595
Update the dockerfile by adding
RUN chown cit595:cit595 /home/cit595
The PDF instructions in Project 0: Description will need to be replaced with a updated instructions.
The current version (v5) is saved in Google Drive here: https://docs.google.com/document/d/1nb8pSyI3lWWMtjzwzGUlQuqskM8aH_x73qBxwaVqFcc/edit#
I see that @kuang-da already started working on a version of Project 0 description for Docker in August 2021:
https://docs.google.com/document/d/1Se_ncw_QvQluBo9k4gnIQqzWdACz8gHTIpG1zLlPaGk/edit#
I have compared it with v5 and have so far made some minor edits (list to be expanded in follow up comments to this issue):
There are more edits that need to be made - removing a few references to Vagrant, and making sure that instructions are consistent with the GitHub README , which I believe is the current, most tested set of instructions. @kuang-da - can you confirm this?
Ideally students will never have to install anything in the containers. https://edstem.org/us/courses/58581/discussion/4979122 required (or at least used for debugging) ping
so we should add it
In Coursera, we should move the Docker Environment Tutorials from Resources to immediately following Project 0 Description in Week 1.
VSCode will stop supporting Ubuntu 18 in 2025, so we should just upgrade now
Starting from a503785, I removed the PlugInstall from installation script. It is because now we mount the host folder to /home/cit595
and it will reset the Vim configuration. To bypass that, I added a section about Set up Vim
in README.md but it would be nice if we could have all the plugins ready out-of-box.
It would be nice if we could prepare the Docker image for Apple M1 students. But currently, Docker Hub is not able to automated build images for ARM64. Link
Docker Buildx can be used for cross-platform building.
Unless I'm reading docker-setup.sh
wrong, we don't give the students python? Can anyone confirm?
Doing a search for "Vagrant" in Coursera brought up prior semesters' recorded Project 0 Recitations.
Would it make sense to remove previous Recitations? - To answer this later question, I would like to watch some of these videos and determine if they are still valuable in a post-Vagrant 595.
If we decide to keep them, it might make sense to add a sentence to Project 0 Description to the effect that recorded Recitations for Project 0 from Fall 2021 are for a different Virtual Machine setup.
Recently, I've encountered issues when building the docker image from the Dockerfile and docker-setup.sh file.
Following the instructions in the README for ARM64 Architecture, when running "docker-compose build mcit", the build does not complete because of hash sums not matching for some installations in docker-setup.sh.
If I comment out all parts of the docker-setup.sh file after the line:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
then the build is able to complete.
I believe the issue may have to do with my current internet, as I was able to build without problem in other locations.
I am not sure if others will encounter this issue, but I believe it would be best to do a multi-architecture build of the image for amd64 and arm64 so that Apple M1 users can also Pull the docker image and will not need to build it.
I am unable to build the multi-arch image because of the above issue.
@kuang-da , would you mind trying to build the multi-arch image and push it the course Dockerhub? I was able to follow tutorials online, such as this one, using my own Docker hub account and some test Dockerfiles.
There were some requests last semester to make the docker prompt have colour (similar to how vagrant looked). What is the possibility of modifying the bash profile to include colors for username and current directory?
Here is a basic resource: change bash colours
Pages to be removed (or hidden from students):
In Week 1:
Vagrant FAQs
TA Demo: Course VM Environment
In Resources:
Project 0 VagrantFile
Do we need to maintain a collection of Vagrant resources to be made available to any students for whom there is some insurmountable roadblock to using Docker, and form whom Vagrant may work? (Is that even likely?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.