-
Install
dockerfor your platform- Windows
- Install WSL2
- Open PowerShell as Administrator
- Enter following commands to install WSL2
wsl --installwsl --set-default-version 2 - Enter following command to allow scripting
Set-ExecutionPolicy RemoteSigned - Microsoft's guide for install WSL 2: https://learn.microsoft.com/en-us/windows/wsl/install
- https://docs.docker.com/docker-for-windows/wsl/
- Install WSL2
- Mac
- Windows
-
Install
gitfor your platform- Windows
- (Optional) Installing Windows Terminal
You can installing it from Microsoft Store: https://apps.microsoft.com/detail/9n0dx20hk701 - Check for Git: Open Windows Terminal and type
git --version. - Install Git: If you receive an error, download and install git: https://git-scm.com/downloads
- (Optional) Installing Windows Terminal
- Mac
- Check for Git: Open Terminal and type
git --version. - If Git is not installed, follow the on-screen prompts or try running
xcode-select --install
- Check for Git: Open Terminal and type
- Windows
-
Clone this repository
git clone https://github.com/INUOS-s26/os-docker-env.git -
Start the container
- Mac/Linux: Run
./learncli.sh. - Windows: Run
./learncli.ps1. - When you start the Docker image, Docker will create the
workdirdirectory that is bridged between the image and your native operating system, where you can copy and move files between the the two. - Be sure to use
exitcommand to finish the session to stop the container.
- Mac/Linux: Run
-
Configuring Git Environment Variable \ To avoid entering
git config --global ...after each restart you can set your git environmental variable in.bash_profile- Start your container (
./learncli.shor./learncli.ps1). - Open
../.bash_profilein your favorite text editor (vim ../.bash_profile). - Change lines 8-11 from
- Start your container (
#export GIT_AUTHOR_NAME=""
#export GIT_COMMITTER_NAME=""
#export GIT_AUTHOR_EMAIL=""
#export GIT_COMMITTER_EMAIL=""
to
export GIT_AUTHOR_NAME="Your Name"
export GIT_COMMITTER_NAME="Your Name"
export GIT_AUTHOR_EMAIL="you@email.com"
export GIT_COMMITTER_EMAIL="you@email.com"
- Setting up SSH authentication for Github
- On your local computer
- Navigate to the os-docker-env directory that contains
learncli.shfile, but do not execute it. - Type
ssh-keygen, type.ssh/id_rsaas the location to save the key, and press enter for no passphrase at the password prompt. - Running cat
.ssh/id_rsa.pubshould output the needed key as text to the console, which you should copy for the next part.
- Navigate to the os-docker-env directory that contains
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/root/.ssh/id_rsa): .ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
SHA256:4yheFb7P2rzq/fJ71+AKPssyEQq7+bI0YcnK8+rzfr8 ceclia@topkek
The key's randomart image is:
+---[RSA 2048]----+
| |
| |
| . |
| ... ... |
| =o .S. |
| . o...+.o . |
| + +oo o.. . ..|
| .=++. oOo. o o|
| .o=*=.oE*@B=+ . |
+----[SHA256]-----+
- On Github
- Click your profile in the top right corner.
- Click Settings -> SSH and GPG keys -> New SSH Key.
- Paste the contents of
.ssh/id_rsa.pubinto the "Key" section. - Give it a Title and click "Add SSH Key".